Creating a Search

JennJenn

Registered User.
Local time
Today, 13:20
Joined
May 15, 2002
Messages
13
I have a form that I would like to allow the user to search data from the form's table by Name and Date. How would I get started with this? Would I have to create another table?

Thanks David. You're THE BEST!!

[This message has been edited by JennJenn (edited 05-22-2002).]
 
Nope, you just use the (unbound) fields on your new form to filter the records on the table when you open it.

Example: In the Click event for a "Open Form" event on your search form, you put something similar to this:
DoCmd.OpenForm "Regular Form",,"[NameFieldInForm'sRecordSource] = '" & Me.NameSearchField & "' AND [DateField] >= #" & Me.DateSearchField &"#"

Keep in mind you are filtering the recordsource, not the form, so use the field names, not the control names on "Regular Form".

Good luck,
David R
 

Users who are viewing this thread

Back
Top Bottom