By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,959 Members | 1,139 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,959 IT Pros & Developers. It's quick & easy.

Passing A Date Range

P: n/a
Hi, I am having a problem. I have a very simple employee database.
The client needs to see everything on a form before any updates or
deletions can be made. I have a form that loads with two parameters
(date range) a start date and a end date. I have two queries -
Separation Update (adds to the separation table) and Separation Delete
(deletes from the main table), they both run with the same parameters
as the form. Is there a way that the user only has to enter once the
Start Date and the End Date? I can't figure out how to pass the
parameters from the form to the separation update query and then to
the separation delete query. Any assistance would be welcome. Thanks
in advance. Pat
Sep 18 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
RoadRunner wrote:
Hi, I am having a problem. I have a very simple employee database.
The client needs to see everything on a form before any updates or
deletions can be made. I have a form that loads with two parameters
(date range) a start date and a end date. I have two queries -
Separation Update (adds to the separation table) and Separation Delete
(deletes from the main table), they both run with the same parameters
as the form. Is there a way that the user only has to enter once the
Start Date and the End Date? I can't figure out how to pass the
parameters from the form to the separation update query and then to
the separation delete query. Any assistance would be welcome. Thanks
in advance. Pat
Here's one method. Lets say your form name is called UpdtDelForm.

Open your query in design mode. Then under the start date column, in
the criteria row, enter
Forms!UpdtDelForm!StartDate
and under the end date
Forms!UpdtDelForm!EndDate

Change the field/form names to relect your own.

You could also check this out
http://www.mvps.org/access/queries/qry0003.htm

Sep 18 '08 #2

P: n/a
The problem is that they are not separate fields, they are under one
field (Date) in both the form and the query.

On Sep 18, 1:54*pm, Salad <o...@vinegar.comwrote:
RoadRunner wrote:
Hi, *I am having a problem. *I have a very simple employee database..
The client needs to see everything on a form before any updates or
deletions can be made. *I have a form that loads with two parameters
(date range) a start date and a end date. *I have two queries -
Separation Update (adds to the separation table) and Separation Delete
(deletes from the main table), they both run with the same parameters
as the form. *Is there a way that the user only has to enter once the
Start Date and the End Date? *I can't figure out how to pass the
parameters from the form to the separation update query and then to
the separation delete query. *Any assistance would be welcome. *Thanks
in advance. Pat

Here's one method. *Lets say your form name is called UpdtDelForm.

Open your query in design mode. *Then under the start date column, in
the criteria row, enter
* * * * Forms!UpdtDelForm!StartDate
and under the end date
* * * * Forms!UpdtDelForm!EndDate

Change the field/form names to relect your own.

You could also check this outhttp://www.mvps.org/access/queries/qry0003.htm
Sep 18 '08 #3

P: n/a
RoadRunner wrote:
The problem is that they are not separate fields, they are under one
field (Date) in both the form and the query.
If using Date as the fieldname, since it's a reserved word, use [Date]

If 1 column for the date field, then use Between in the criteria. Ex
Between [Forms]![Form1]![Date1] And [Forms]![Form1]![Date2]
>
On Sep 18, 1:54 pm, Salad <o...@vinegar.comwrote:
>>RoadRunner wrote:
>>>Hi, I am having a problem. I have a very simple employee database.
The client needs to see everything on a form before any updates or
deletions can be made. I have a form that loads with two parameters
(date range) a start date and a end date. I have two queries -
Separation Update (adds to the separation table) and Separation Delete
(deletes from the main table), they both run with the same parameters
as the form. Is there a way that the user only has to enter once the
Start Date and the End Date? I can't figure out how to pass the
parameters from the form to the separation update query and then to
the separation delete query. Any assistance would be welcome. Thanks
in advance. Pat

Here's one method. Lets say your form name is called UpdtDelForm.

Open your query in design mode. Then under the start date column, in
the criteria row, enter
Forms!UpdtDelForm!StartDate
and under the end date
Forms!UpdtDelForm!EndDate

Change the field/form names to relect your own.

You could also check this outhttp://www.mvps.org/access/queries/qry0003.htm

Sep 18 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.