View Full Version : Searching Two Colums


jonnygilmour
07-07-2008, 12:09 PM
Is there any way to search for a value that could be in one of two colums using a query. I am trying to put together a herdbook and if a replacement id tag is issued this has to stay in a seperate colum to the normal ID number so i need to search both these colums when querying an animal

MSAccessRookie
07-07-2008, 12:52 PM
I think that something like this might be a good start:

Select { Whatever you are looking for }
From Herdbook
Where (([IDTagtoFind]=Herdbook.IDTag) OR
([IDTagtoFind]=Herdbook.ReplacementIDTag))

Purple = Columns/Tables that you may need to change
Red = Unknown values for you to insert

jonnygilmour
07-07-2008, 01:17 PM
thank you for your reply i think this has done the trick

MSAccessRookie
07-07-2008, 04:32 PM
Always glad to know when I have assisted a fellow Traveler in the wonderful world of Access.