Criteria problem?

MiAs

Registered User.
Local time
Today, 14:26
Joined
Oct 25, 2004
Messages
49
I have a form with several fields where a ref number such as AB1234 may be entered in one field but this ref number may also be entered in another field referring to another order.
Using 'Like[RefNumber]' as a criteria is only returning ref number from one field when same number may be in another field and is also required.
I have tried repeating 'Like[RefNumber] for all fields in query but doesn't work,also tried 'And' & 'Or'
Any suggestions please
 
WHERE (([RefNumber1] like "*" & Forms!Myform!RefNumber & "*") OR ([RefNumber2] like "*" & Forms!Myform!RefNumber & "*"))

As one way, assuming the target is specified in a form field
 
Thanks for reply Fofa but can you make it more simple as I haven't your programming skills!
 
Basically it is ((somefield LIKE Some value) OR (someotherfield like somevalue))
Notice the parens.
The value should contain at least 1 wildcard character (or why use like)
SO where is the refnumber coming from? I assume the user specifies it somewhere.
 
Thanks for your help FoFa
I managed to get it working with the & "*" criteria
 

Users who are viewing this thread

Back
Top Bottom