nicksource
Registered User.
- Local time
- Today, 13:16
- Joined
- Feb 18, 2008
- Messages
- 69
I have a Combobox so the enduser can search and select items for the form below it rather than clicking the arrows for Next/Previous.
However I have an issue with DLookup queries.
My Combobox is called 'F_ComboBox' (I use F_ in my forms to indicate it's a form textfield and not from a table).
My first field in the form, called 'F_ProdID', I want it to select the rows ID from the Combobox option selected. So it's simply:
Which works fine, it shows the ID for what I selected... but when I do this to show my ProductName...
Or the same but using the first textfield:
It loads once but if I select another item out of the Combobox it doesn't change, it just stays on the last result. So the query works, just doesn't refresh when a new item is picked from the ComboBox.
Am I doing something wrong?
Thanks,
Nick.
However I have an issue with DLookup queries.
My Combobox is called 'F_ComboBox' (I use F_ in my forms to indicate it's a form textfield and not from a table).
My first field in the form, called 'F_ProdID', I want it to select the rows ID from the Combobox option selected. So it's simply:
Code:
=[F_ComboBox]
Which works fine, it shows the ID for what I selected... but when I do this to show my ProductName...
Code:
=DLookup([ProductName], 'Products', [ProdID] = [F_ComboBox])
Or the same but using the first textfield:
Code:
=DLookup([ProductName], 'Products', [ProdID] = [F_ProdID])
It loads once but if I select another item out of the Combobox it doesn't change, it just stays on the last result. So the query works, just doesn't refresh when a new item is picked from the ComboBox.
Am I doing something wrong?
Thanks,
Nick.