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.
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.