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 / Queries / August 2006

Tip: Looking for answers? Try searching our database.

one parameter dependent on another

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Loni - RWT - 03 Aug 2006 23:20 GMT
We are trying to generate a query which will be used as the basis for an
upcoming report.  The query needs to select records from within a date range
but the date range is dependent upon another field (TruckID).  The report
will compile information grouped by TruckID.  The date range for the records
selected to calculate the information for one field of the report will vary
for each TruckID.  The beginning and ending dates will be stored in the
Trucks Table.  How do we create the query that will get the appropriate date
ranges for each TruckID as the report groups them?  I know how to create the
query where you supply these parameters, but how do you get the parameters to
lookup the appropriate date ranges from the Trucks table relative to the
truck information within the report?  Thanks for any suggestions.
KARL DEWEY - 04 Aug 2006 00:17 GMT
Create the query in design view adding both tables.  Left join on TruckID to
the truck-date range table (just in case someone omitted a truck from the
table).

For criteria use   IIF([Trucks Table].[beginning] Is Not Null, Between
[Trucks Table].[beginning] and [Trucks Table].[ending], Like "*") Or Is Null

> We are trying to generate a query which will be used as the basis for an
> upcoming report.  The query needs to select records from within a date range
[quoted text clipped - 7 lines]
> lookup the appropriate date ranges from the Trucks table relative to the
> truck information within the report?  Thanks for any suggestions.
 
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.