Search for specific records

CJ UK

Registered User.
Local time
Today, 05:18
Joined
Jul 2, 2003
Messages
15
Hi all.

I have a search form on my database which consists of three text fields and three buttons. This is to enable you to search for record by surname or date of birth or record id. The code behind each button is:

DoCmd.OpenForm "Records", acNormal, , "[Surname] Like '*" & Me.Text1 & "*'"

DoCmd.OpenForm "Records", acNormal, , "[Date Of Birth] Like '*" & Me.Text2 & "*'"

DoCmd.OpenForm "Records", acNormal, , "[Record ID] Like '*" & Me.Text3 & "*'"

What I want to do is only have one button "Search" rather than having three. Also is it possible then to enter search criteria in more than one of the text fields, i.e. Surname & Date of Birth to get a more accurate result?

Any help greatly appreciated.

Regards, Carl.
 
Search for a specific record

Hi Dave.

Thanks for the example. I am sure I will be able to modify this suit my needs - excellent! It also seems a very user friendly way of going about it and I can see that it will be more efficient too.

If you get a chance, would you mind looking at my other posts and see if you have any suggestions as you have already proved to be a bit of a guru (creep, creep, lol).

Thank you.
 

Users who are viewing this thread

Back
Top Bottom