Additional search (1 Viewer)

DavRob

New member
Local time
Today, 19:33
Joined
Oct 19, 2019
Messages
27
Hi All,

I have a search form based on a query "completed_addressqry" which has 2 tables "Completed_Addressed" and "Payment" the search works fine.

My issue is that some time ago I began to capture the full address not just the suburb, so I updated the query "completedqry" which was based on 2 tables "Completed" and "Payment" therefore I only get results from the new query, but I need to get search results from both queries, currently I am running 2 search forms, which is cumbersome and confusing.

My aim is to be able to use 1 search form, I have tried a query using the 3 tables ("Completed_Addressed", "Completed" and "Payment") this gives duplicate results.

Is it possible run a query and if there are no results found, then run a second query.

i.e. If I search with "completed_addressqry" if not results found then run "completedqry" so that I can get results from the 3 tables.

Thanks

DavRob
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 18:03
Joined
May 7, 2009
Messages
19,234
so you already done using Union Query (union the 3 tables)?
if there is duplicate you can only Output the 1st result.
 

isladogs

MVP / VIP
Local time
Today, 11:03
Joined
Jan 14, 2017
Messages
18,216
Yes its possible to do this, probably in more than one way. However your post doesn't give enough info to provide a clear answer.
Suggest you upload a cut down copy of your database with a few records of modified data so someone can suggest a specific solution.
 

DavRob

New member
Local time
Today, 19:33
Joined
Oct 19, 2019
Messages
27
so you already done using Union Query (union the 3 tables)?
if there is duplicate you can only Output the 1st result.
Thanks for the reply

I have tried a Union Query and it gives duplicate records, am I missing something.

I'll do a cut down version to submit as suggested by isladog.

DavRob
 

Users who are viewing this thread

Top Bottom