populating the form

sweetpea58

New member
Local time
Yesterday, 23:15
Joined
Jun 11, 2005
Messages
9
:confused: I recently added a find button, using the wizard in access, i am searching three feilds ( Id, Last name & first name) when i type in these feilds and want other info to populate on the same form. now i need to update the code, so that when i hit the find button it does populate.
can anyone help

Thanks

PS the form is based on a table and not a query, I saw some info in the forum about using a combo :confused: box, but i don't want to do that.
 
SweetPea,

Use a query. For each of the search fields put the following in the
Criteria section:

Forms![YourMainForm]![YourSearchField]

Then the only "Code" that you'll need for the Find Button:

Me.ReQuery

You could also use the AfterUpdate event of your search fields and
get rid of the Find Button.

Last note. You'll have to supply an appropriate (Valid) DefaultValue
for your search fields ... Or complicate your query a bit to handle
the cases where they have no value.

A query really is the way to go though.

Wayne
 
Thanks a lot Wayne, I'll try that now
 

Users who are viewing this thread

Back
Top Bottom