Multiple Field Search using VB (Not a Question)

J

James

Hi all

I finally came up with a code, with alot of help from the people on this
site Thanks! in VB that allows you to use a button or drop down list ect. in
a form to search multiple fields and display a form with the matching data.
just in case some people were in the same boat I was i thought i would give a
more general version, for text format data.

DoCmd.OpenForm "Name of form you want to open", , , "[Name of Field 1]= '" &
Me!Name of data input source & "' OR [Name of Field 2]= '" & Me!Name of
data input source & "' OR [Name of Field 3]= '" & Me!Name of data input
source & "'"

this should all be on 1 line, remember if you want to use number format or
something else then you will need to change the quotes.

-James
 
Top