Parameter in query not taking the value


N

navin

Hi,

I am passing the start and end date through a label in form to the
below query but value is always 0. If I remove the parameter and
replace it by writing Start Date and End Date, it prompts for the
value to be entered but when i run the query in below form, it does
not prompt at all.

PARAMETERS [Forms]![frmReports]![lblSDate] DateTime,[Forms]!
[frmReports]![lblEDate] DateTime;
SELECT Round(count(Requisition)/21) AS ARPD, Round(count(Requisition)/
5.5) AS ARPB, round(ARPD/5.5) AS ARPBD
FROM tblPOData
WHERE transDate Between [Forms]![frmReports]![lblSDate] And [Forms]!
[frmReports]![lblEDate];

Please help...

Thank you in advance.
Navin
 
Ad

Advertisements

K

kc-mass

I don't think you want to use labels to store parameters
(use text box instead) but if you must I think you need to change the
reference to [frmReports]![lblEDate].Caption
 
N

navin

It may be that the label control has no value.  What happens if you change
those label controls to textboxes?

--
Regards

Jeff Boycewww.InformationFutures.net

Microsoft Office/Access MVPhttp://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentorhttp://microsoftitacademy.com/




I am passing the start and end date through a label in form to the
below query but value is always 0. If I remove the parameter and
replace it by writing Start Date and End Date, it prompts for the
value to be entered but when i run the query in below form, it does
not prompt at all.
PARAMETERS [Forms]![frmReports]![lblSDate] DateTime,[Forms]!
[frmReports]![lblEDate] DateTime;
SELECT Round(count(Requisition)/21) AS ARPD, Round(count(Requisition)/
5.5) AS ARPB, round(ARPD/5.5) AS ARPBD
FROM tblPOData
WHERE transDate Between [Forms]![frmReports]![lblSDate] And [Forms]!
[frmReports]![lblEDate];
Please help...
Thank you in advance.
Navin- Hide quoted text -

- Show quoted text -

Thank you very much. Changing the label to text box resolved the
problem.

Navin
 
Ad

Advertisements


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

Similar Threads


Top