Custom Form to supply parameters to a query/report

G

Guest

I created a custom form to supply parameters. The custom form works but when
I run the query, it is not giving me the correct captions on the form. It
lists the entire object, just as it is listed in the QBE window

Example:
Between [Forms]![Employees Listed by Control Number within Date
Range]![StartDate] And [Forms]![Employees Listed by Control Number within
Date Range]![EndDate]

I was expecting a simple - StartDate and EndDate parameter.

What am I doing wrong here?
 
S

SusanV

For date fields you need to enclose the date in hashmarks. Try:

Example:
Between #[Forms]![Employees Listed by Control Number within Date
Range]![StartDate]# And #[Forms]![Employees Listed by Control Number within
Date Range]![EndDate]#
 
G

Guest

Didn't work, tells me date expression is not valid. I actually have another
parameter that is giving me the same problems. All the parameters are in a
custom form.
ControlNumber: - Combo Box
Start Date:
End Date:
My problem is that the Custom form (Dialog box) does not appear with the
three controls when I run my query.

SusanV said:
For date fields you need to enclose the date in hashmarks. Try:

Example:
Between #[Forms]![Employees Listed by Control Number within Date
Range]![StartDate]# And #[Forms]![Employees Listed by Control Number within
Date Range]![EndDate]#

--
hth,
SusanV


Olu Solaru said:
I created a custom form to supply parameters. The custom form works but
when
I run the query, it is not giving me the correct captions on the form. It
lists the entire object, just as it is listed in the QBE window

Example:
Between [Forms]![Employees Listed by Control Number within Date
Range]![StartDate] And [Forms]![Employees Listed by Control Number within
Date Range]![EndDate]

I was expecting a simple - StartDate and EndDate parameter.

What am I doing wrong here?
 

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