search field added to a form?

sharinglife

Registered User.
Local time
Today, 09:35
Joined
Jan 21, 2003
Messages
10
Hello everyone,

I'm new here and need some help.

We're putting together a database that has multiple quieries in it. I need to add a feature of some sort that will allow me to search any one of 3 fields.

Can anyone help me?
 
This has been addressed multiple times here.

Use the search button,
Type in "Search and Multiple" and you will get some
info.

Then as you try things, post your questions.

Wayne
 
:confused: I'm so confused with all of this. I don't know what in the world I'm doing. I have created a lot of stuff using Access, but never anything like this.

Can someone please help me? I can send you the file I'm working on if that will help.

Thanks
 
Danny,

Let's say that you have a form with 10 fields.
Your fields are "bound" to a table within
your database.

Access lets you single-step through your records
using the navigation buttons.

Now, add three new textboxes along the right-hand
side of the form. These are not directly related
to your table. Their names are txtName, txtDept
and txtSkill. Use the BeforeUpdate or AfterUpdate
event to put this line of code in each of them:

Me.Requery

Then make a new query, based on your table that
includes all of your fields on your form. For the
name field put as its criteria:

Like "*" & Forms![YourFormName]![txtName] & "*"
IsNull(Forms![YourFormName]![txtName])

These are on two seperate lines meaning that
it is an or condition.

Repeat the above for the other two search
fields.

Then save this new query and use it as the
record source for your form.

The end result is that whenever the content
of any of your three text boxes changes the
form will be requeried.

hth,
Wayne
 

Users who are viewing this thread

Back
Top Bottom