L
Lauren B
I have figured out how to search multiple fields using the following code:
DoCmd.OpenForm "Form1", acNormal, , "Field1 Like '*" & Me.Text1 & "*' AND
Field2 Like '*" & Me.Text2 & "*' AND Field3 Like '*" & Me.Text3 & "*'"
This code allows that user to search by any of these three criteria;
however, records with blank fields do not appear. For example, if a user
searches for all entries with the letter "A" in field 1, all entries with
the letter "A" in field will appear with the exception of those that have a
blank field 2 or field 3.
Is there a way to write my code so that entries with null fields will be
included?
Thank you for any assistance.
LB
DoCmd.OpenForm "Form1", acNormal, , "Field1 Like '*" & Me.Text1 & "*' AND
Field2 Like '*" & Me.Text2 & "*' AND Field3 Like '*" & Me.Text3 & "*'"
This code allows that user to search by any of these three criteria;
however, records with blank fields do not appear. For example, if a user
searches for all entries with the letter "A" in field 1, all entries with
the letter "A" in field will appear with the exception of those that have a
blank field 2 or field 3.
Is there a way to write my code so that entries with null fields will be
included?
Thank you for any assistance.
LB