beginer on recordsets

ion97

Registered User.
Local time
Today, 01:20
Joined
Feb 28, 2001
Messages
27
How do I transfer a specific value in a Query to a field in a form?

To be more specific: I have a Query with
three columns. I want the user to select a value from a combobox on a form (the combobox looking up values from the first column of my Query) and on another field on the same form to have the value of the third column in the same record.
It should be simple, but I have no idea how to work with recordsets. I've tried a "rs.Find", but I must be doing something wrong because I don't get anything on the "target" field of my form.
 
After update of the combobox use the dlookup funtion to populate the field on your form.

example: [formfield]= DLookup("[yourqry].[column3]", "[yourqry]", "[yourqry].[column1]=[combobox].value")

Hope this helps!

~ Joe
 
Add the third column of your query to the combo box in the after update event of the combo add Me.YourTextboxName=Me.ComboName.Column(1) where column 1 is the second column of your combo box.
HTH
 

Users who are viewing this thread

Back
Top Bottom