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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calendar and Crosstab error 1

Status
Not open for further replies.

JamesDSM50328

Technical User
Mar 25, 2005
33
0
0
US
I am having a problem and getting runtime error 3770. (Microsoft Jet does not recognize Forms!Apps!Calendar1 as a valid field name or expression)
I have 2 calendar controls on a form and need to use the dates from the calendar controls to pull the query.
I have several select queries that work just fine referencing the calendar values but the crosstab is not wanting to work.
Any assistance would be great
Code:
TRANSFORM Count(Applog.LoanNumber) AS CountOfLoanNumber
SELECT Applog.DateEntered
FROM Applog
WHERE ((Applog.DateEntered) Between (forms!Apps!calendar1) And (forms!Apps!calendar2))
GROUP BY Applog.DateEntered
PIVOT Applog.AppTaker;
 
You may try this:
PARAMETERS [Forms]![Apps]![calendar1] DateTime, [Forms]![Apps]![calendar2] DateTime;
TRANSFORM Count(Applog.LoanNumber) AS CountOfLoanNumber
SELECT Applog.DateEntered
FROM Applog
WHERE ((Applog.DateEntered) Between ([Forms]![Apps]![calendar1]) And ([Forms]![Apps]![calendar2]))
GROUP BY Applog.DateEntered
PIVOT Applog.AppTaker;

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top