By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,285 Members | 1,647 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,285 IT Pros & Developers. It's quick & easy.

Problem with Query Date Parameter Selection

P: n/a
I have attempted to resolve a problem regarding erroneous output using
a Between [Beginning Date] And [Ending Date] parameter on several
Access 97 queries, but to no avail. The queries are used for report
output and regardless of the beginning and ending dates entered, the
reports show all activity including before and after the dates
entered.

There is a frmAccount and two subforms sfrmPurchase and sfrm Sales. In
order to isolate costs for each collectively, both Purchase and Sales
have Beginning and Ending Date parameters as the criteria on the query
grid. It seems that using the DSum expression causes the query/report
to ignore the date ranges and simply include all account activity. One
of the query expressions is:

Purchases: DSum("[Sales]","tblSales","[SalesID] = " & [AcctID])

Actually, there are six similar expressions on the query. I have take
another more simplistic approach and just used the fields from the
three tables like:

UnitsSold
SalesPrice
[UnitsSold]*[SalesPrice]
etc.

Going this route does work in providing data based on the Between and
Ending dates selected only, but the output on the reports is garbage
because it apparently lacks the Where type clause that DSum expression
provides. So after trying several different methods and none proving
successful, I ask for anyone's assistance to resolve this problem.
Thanks, Dalan
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Dalan
You could possibly try to put the Dsum in one query and the parameters
in another query. Then create one final query from both of them to
use. Instead of putting the parameters in a query, you could put
fields on a form to use as your parameters instead. Just a couple
ideas.
Kara

www.klh-tech.com
KLH Technology Solutions
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.