Matthew Snook
NW Salmon Database
- Local time
- Today, 04:17
- Joined
- Apr 19, 2001
- Messages
- 133
Situation:
Item One: Combo box on form, used for lookup. Works great. First column bound and invisible, stores a code in the field. Second column used to select a value from the first column in the underlying query. When I type an entry into the box, it retrieves a record and stores the hidden value. All very normal.
Item two: I use a peripheral device to read an electromagnetic tag. I can put the value from the comm control receive buffer into a text box, so:
Me!TextBox = Me!ComPort1.Input
But if I do this to my ComboBox which is used in the form lookup, the code merely blanks out the text from the combobox and does not apply the text from the buffer. Consequently, there is no value with which to perform the lookup.
I know the text is there, because it works on the text box. Why not with the combo box, and, is there a way to do this?
If none of that will work, how can I create in code the same type of lookup that is created with a combobox? I can assign the value in the receive buffer to a variable, as a starting place, now I'd like to use that value to perform the same lookup the combo box would do were I to type the value into the box.
Thanks,
Matt
Item One: Combo box on form, used for lookup. Works great. First column bound and invisible, stores a code in the field. Second column used to select a value from the first column in the underlying query. When I type an entry into the box, it retrieves a record and stores the hidden value. All very normal.
Item two: I use a peripheral device to read an electromagnetic tag. I can put the value from the comm control receive buffer into a text box, so:
Me!TextBox = Me!ComPort1.Input
But if I do this to my ComboBox which is used in the form lookup, the code merely blanks out the text from the combobox and does not apply the text from the buffer. Consequently, there is no value with which to perform the lookup.
I know the text is there, because it works on the text box. Why not with the combo box, and, is there a way to do this?
If none of that will work, how can I create in code the same type of lookup that is created with a combobox? I can assign the value in the receive buffer to a variable, as a starting place, now I'd like to use that value to perform the same lookup the combo box would do were I to type the value into the box.
Thanks,
Matt