Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / February 2008

Tip: Looking for answers? Try searching our database.

Query Help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ryan Tisserand - 05 Feb 2008 22:11 GMT
I have a query with a Where statement.  The results of that query are used to
populate the data iand peform calculations in the next query.  If the first
query produces no results, the second does not either.  How would I tell
access to put a value of 0 in one of the fields as a result in the first
query so that the second query would produce results with a field that has a
value of 0 instead of not returning any values at all?
KARL DEWEY - 05 Feb 2008 23:45 GMT
I have not tried this but it might work for you.
Use your query in a union query.
Create a query with subquery that counts records from your where statement.  
If count is zero produce a record with 0 AS a field.
If there are record ok, if not then the second half of union will give you
the false record.
Signature

KARL DEWEY
Build a little - Test a little

> I have a query with a Where statement.  The results of that query are used to
> populate the data iand peform calculations in the next query.  If the first
> query produces no results, the second does not either.  How would I tell
> access to put a value of 0 in one of the fields as a result in the first
> query so that the second query would produce results with a field that has a
> value of 0 instead of not returning any values at all?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.