Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to write the parameters of underlying query to report header? 1

Status
Not open for further replies.

Ravensleach

Programmer
Oct 19, 2004
45
PE
Hi guys

I have a report based on a parameter query which prompts for DateVisit using a BETWEEN ... AND criterion.

I would like to be able to show the parameters entered in the header of the report (which are not necessarily the first and last dates shown in the data)

Here is the SQL

SELECT tblvisits.ID, tblvisits.[Date contact], tblvisits.DateVisit, tblvisits.[Time of visit], tblvisits.[group rep], tblvisits.[rep Email], tblvisits.background, tblvisits.website, tblvisits.Title, tblvisits.Name, tblvisits.Guide, tblvisits.Boat, tblvisits.VIP, tblvisits.interest, tblvisits.[Donation onsite], tblvisits.Pledge, tblvisits.Type, tblvisits.Address1, tblvisits.Address2, tblvisits.Address3, tblvisits.Zip, tblvisits.ID_pais, tblvisits.Tel, tblvisits.email, tblvisits.[Tour company], tblvisits.[Requested by], tblvisits.Met, tblvisits.Notes, tblvisits.Followup, tblvisits.[CDRS plan]
FROM tblvisits
WHERE (((tblvisits.DateVisit) Between [from when? (mm/dd/yyyy)] And [to when? (mm/dd/yyyy)]));

Any help you can give would be very welcome

Thanks
 
Just add the parameter fields into the Select statement:

SELECT tblvisits.ID, tblvisits.[Date contact], tblvisits.DateVisit, tblvisits.[Time of visit], tblvisits.[group rep], tblvisits.[rep Email], tblvisits.background, tblvisits.website, tblvisits.Title, tblvisits.Name, tblvisits.Guide, tblvisits.Boat, tblvisits.VIP, tblvisits.interest, tblvisits.[Donation onsite], tblvisits.Pledge, tblvisits.Type, tblvisits.Address1, tblvisits.Address2, tblvisits.Address3, tblvisits.Zip, tblvisits.ID_pais, tblvisits.Tel, tblvisits.email, tblvisits.[Tour company], tblvisits.[Requested by], tblvisits.Met, tblvisits.Notes, tblvisits.Followup, tblvisits.[CDRS plan],[from when? (mm/dd/yyyy)],[to when? (mm/dd/yyyy)]

FROM tblvisits
WHERE (((tblvisits.DateVisit) Between [from when? (mm/dd/yyyy)] And [to when? (mm/dd/yyyy)]));
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top