Parameter query

  • Thread starter Thread starter Jen
  • Start date Start date
J

Jen

Hi,
I wanted to pass a date from a form's combo box, which in
the query means >"03/26/2004" . How can I write a
parameter query to express "greater than" a certain date?

Any help is appreciated!
Jen
 
Instead of a parameter, you can refer directly to the combo box.

In the Criteria row of your query, under the date field, enter:
[Forms]![MyForm]![MyCombo]
substituting the name of your form and combo.

If the combo is unbound, set its Format property to Short Date to help
Access understand the data type, and to prevent entry of invalid dates.
 
Hi Allen,
Thank you very much for your help.
Jen
-----Original Message-----
Instead of a parameter, you can refer directly to the combo box.

In the Criteria row of your query, under the date field, enter:
[Forms]![MyForm]![MyCombo]
substituting the name of your form and combo.

If the combo is unbound, set its Format property to Short Date to help
Access understand the data type, and to prevent entry of invalid dates.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

I wanted to pass a date from a form's combo box, which in
the query means >"03/26/2004" . How can I write a
parameter query to express "greater than" a certain date?

Any help is appreciated!
Jen


.
 
PARAMETER ParmDate DATETIME;
SELECT ... FROM TABLE WHERE THEDATE > ParmDate

Works fine too
Pieter
Jen said:
Hi Allen,
Thank you very much for your help.
Jen
-----Original Message-----
Instead of a parameter, you can refer directly to the combo box.

In the Criteria row of your query, under the date field, enter:
[Forms]![MyForm]![MyCombo]
substituting the name of your form and combo.

If the combo is unbound, set its Format property to Short Date to help
Access understand the data type, and to prevent entry of invalid dates.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

I wanted to pass a date from a form's combo box, which in
the query means >"03/26/2004" . How can I write a
parameter query to express "greater than" a certain date?

Any help is appreciated!
Jen


.
 

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

Back
Top