Passing parameters from a form built on a crosstab query

I

ihrigt

First, let me say that I've read just about every post I can find on
parameter passing between forms and queries and tried every suggestion; I
must be missing something easy. I have a crosstab query (SQL below) built
that works fine; a form built based on that query to display results. Once
the form is displayed, I want the user to be able to enter a new date range
and have the appropriate data displayed... Without linking the parameters to
the form, everything works fine; I'm prompted for the date range and the form
displays. With the query criteria linked to the controls on form, I get a
blank form. Entering new dates in the fields makes no difference... no data
appears. Any suggestions.

SQL (created from Crosstab Wizard and entering parms):

PARAMETERS Forms![Payroll Summary]![StartDte] DateTime, Forms![Payroll
Summary]![EndDte] DateTime;
TRANSFORM Sum(CommissionsLinked.NetRep) AS SumOfNetRep
SELECT CommissionsLinked.Category, Sum(CommissionsLinked.NetRep) AS [Total
Of NetRep]
FROM CommissionsLinked
WHERE (((CommissionsLinked.PayrollDte) Between [Forms]![Payroll
Summary]![StartDte] And [Forms]![Payroll Summary]![EndDte]))
GROUP BY CommissionsLinked.Category
PIVOT CommissionsLinked.TxnType In
("EQ","FI","MF","DMF","MA","TRL","INS","ADJ");

StartDte and EndDte are unbound controls on the form, both defined as Short
Dates. I've tried using numerous date functions in the query WHERE clause to
ensure that only the mm/dd/yyyy is coming through on the parms. Same results
on everything I've tried... blank form. HELP!?!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top