A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Using DLookUp and Date form to generate report



 
 
Thread Tools Display Modes
  #1  
Old October 18th, 2006, 12:14 PM posted to microsoft.public.access.reports
artist02 via AccessMonster.com
external usenet poster
 
Posts: 4
Default Using DLookUp and Date form to generate report

Help, I want to use DLookUp and a Date form to generate a report :

I have 2 queries qryTotal_Production and
qryDowntime:

qryDowntime:

SELECT qryDowntimeUnion.Session, qryDowntimeUnion.Machine,
qryDowntimeUnion.Shift, qryDowntimeUnion.Downtime_Code,
Sum(qryDowntimeUnion.Downtime) AS SumOfDowntime,
Format([Date],"dd-mmm-yyyy") AS [Downtime Date]
FROM qryDowntimeUnion
GROUP BY qryDowntimeUnion.Session, qryDowntimeUnion.Machine,
qryDowntimeUnion.Shift, qryDowntimeUnion.Downtime_Code,
Format([Date],"dd-mmm-yyyy")
HAVING (((qryDowntimeUnion.Downtime_Code) Is Not Null) AND
((Sum(qryDowntimeUnion.Downtime)) Not Like "0"));

qryTotal_Production:

SELECT qryScrapUnion.Session, qryScrapUnion.Machine,
qryScrapUnion.Shift, Sum(qryScrapUnion.Scrap_Kgs) AS SumOfScrap_Kgs,
Format([Date],"dd-mmm-yyyy") AS [Scrap Date]
FROM qryScrapUnion
GROUP BY qryScrapUnion.Session, qryScrapUnion.Machine,
qryScrapUnion.Shift, Format([Date],"dd-mmm-yyyy")
HAVING (((Sum(qryScrapUnion.Scrap_Kgs)) Not Like "0"));

I have an unbound report called "test" which has some of these
text boxes: i) txtE1 ii) txtProduction. The controlsource of is like this and

works perfectly:
=Nz(DLookUp("[SumOfDowntime]","qryDowntime","[Downtime_Code] = '" & 3 & "'AND
[Machine]= '" & 1 & "'"),0)

1. How can i create a form where a user can input a date and the DLookUp
above creates the
correct info for that particular date on the report.
2. How can i create a DLookUp on the controlsource of txtProduction based on
qryTotal_Production
where it presents [SumOfScrap_Kgs] from qryTotal_Production where
[Scrap Date] = to the the date entered by a user on the form created above.


Thank you in advance!

PS. Iam an access 2002 novice.

--
Message posted via http://www.accessmonster.com

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:50 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.