ms access - MSAccess - populate text box with value from query -


i have combo box , several text boxes on form. when select value combo box want run query based on value , populate text boxes data returned query. query should return 1 record , textboxes correnspond different columns in record.

i have code:

private sub cbo_equip_loc_change() dim location string me.cbo_equip_loc.setfocus location = dlookup("name", "query1", "position = '" & me.cbo_equip_loc.seltext & "'") me.text51.setfocus me.text51.text = location  end sub 

but error: "this property read-only , can't set"

any ideas?

solved: im idiot.

i had value in control source trying before. removed , worked!

textbox text51 locked, set property locked false.


Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -