473,322 Members | 1,540 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Passing A Date Range

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
3 2730
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: androtech | last post by:
Hello, I'm looking for a function that returns a date range for a specified week number of the year. I'm not able to find functions like this anywhere. Any pointers/help would be much...
3
by: manning_news | last post by:
Using A2K. I've been asked to modify a report currently requiring only one date parameter to now accept a date range. The main report has 2 subreports and is not bound to a table or query. The...
9
by: laurenq uantrell | last post by:
I've gotten sort of fed up with dealing with regional date settings on the client side and am considering the following scheme - just wondering if anyone has a negative view of it or not: ...
18
by: dfetrow410 | last post by:
Anyone have some code that will do this? Dave
0
by: ZRexRider | last post by:
Hi, I've written reports based on stored procedures that receive parameters and it usually seems straight forward. Today I would like to use Crystal Reports parameter interface t prompt for a...
1
by: devyon122 | last post by:
I'm trying to allow a user to type in a beginning data and an ending date to be used in a crosstab query - Below is the query: TRANSFORM Count(imagingdb.ID) AS CountOfID TRANSFORM...
4
Sandboxer
by: Sandboxer | last post by:
I want to be able to program Access to provide for me, by individual day, what my contract obligations are to my customers. Will Access recognize all the individual days in between a date range...
2
by: The KID | last post by:
Hi All So I'm new to this. What I am trying to is the user will fill in a series of text boxes or drop downs. Lets say for this instance begin date and end date. Then they would click a button and...
2
by: grego9 | last post by:
I have a problem in Excel 2000. I have written some VBA code that transfers data from the current excel workbook to a file called "Deal Input2.xls". Everything transfers ok apart from the date in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.