|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
how to reference value from combobox in a query??
i would like to know how to reference a value from a combo box inside a query. Suppose the combo box is cboPartNo and the PartNo that i want to be referenced is in column(1), I want to reference this particular value in a update query such that upon execution, there is no prompts for me to enter the partno.
Thanks. Regards, Tracy |
|
#2
|
||||
|
||||
|
On after update event of the combobox you can assign the value of the combobox column to a textbox like this
me!txtboxname = me!![Combo0].column(2) (if Your desired value is in third column as column count starts from 0) and then design the query SELECT * FROM table WHERE Yourmatchingfield = '" & [Forms]![Formname]![txtboxname] & "'" if your matchingfield datatype is string else SELECT * FROM table WHERE Yourmatchingfield = " & [Forms]![Formname]![txtboxname] In addition you can set the visible property of textbox to false
__________________
V.Subramanian |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > how to reference value from combobox in a query?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|