473,594 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Controlling Dates in Access 2000

Does anyknow how to control dates in acess 2000, the thing is I want
to search for records using a form by date. I will be using a between
date search box. But i want to enter say todays date but retrieve the
results for exactly one month later.

E.G.
I if I enter 10-05-04 to 14-05-04 I want to see the records for
exactly 30/31 days later.

I was thinking could I manipulate the "Today'sDat e" function + 30days.
that way when I open the form to search for results, instead of seeing
today's date in the textboxes, I will see the date for a months time.

Kindest regards
Nov 12 '05 #1
3 1911
On 10 May 2004 04:19:46 -0700, Cillies wrote:
Does anyknow how to control dates in acess 2000, the thing is I want
to search for records using a form by date. I will be using a between
date search box. But i want to enter say todays date but retrieve the
results for exactly one month later.

E.G.
I if I enter 10-05-04 to 14-05-04 I want to see the records for
exactly 30/31 days later.

I was thinking could I manipulate the "Today'sDat e" function + 30days.
that way when I open the form to search for results, instead of seeing
today's date in the textboxes, I will see the date for a months time.

Kindest regards
I find your question a bit confusing. On the one hand your first
paragraph states you wish to enter (say) todays date and retrieve
records for exactly one month later. So if today is May 10, 2004, you
wish records for date of June 10, 2004 ONLY.

Then, in the next paragraph, you write: I if I enter 10-05-04 to 14-05-04 I want to see the records for exactly 30/31 days later. <


What is it you wish to do? Enter May 05 OR enter May 14 and return
records of June 05 or June 14, OR do you wish to enter both a start
(May 05) and an end (May 14) and return records between Jun 05 and
June 14th?

The problem with looking for records within a 1 month span and using a
DateField + 30 days is that a month can be 28, 29, 30, or 31 days in
length.

Access has a DateAdd() function that will take into account the
different month lengths.

On an form, add an unbound text control.
Set it's format property to a valid date format.
Name this control "FromDate".
Add another unbound control as above.
Name this one "ToDate".

You can then search for a variety of date criteria combinations.
1) In the query, on the Date field's criteria line, write:
Between forms!FormName! FromDate and
DateAdd("m",1,f orms!FormName!F romDate)

The above function will return all records between the date on the
form and the same date, one month later.

2) You can adapt the above to whichever of the above scenarios you
wish:
Between DateAdd("m",1,f orms!FormName!F romDate) and
DateAdd("m",1,f orms!FormName!T oDate)

The above will find records for the period between one month after the
entered From and the To dates. If you have entered both May 5 and May
14, the records returned will be between June 5 and June 14th.

Look up the DateAdd function in VBA help.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 12 '05 #2
Ray
le*@prologic.ie (Cillies) wrote in message news:<ba******* *************** ****@posting.go ogle.com>...
Does anyknow how to control dates in acess 2000, the thing is I want
to search for records using a form by date. I will be using a between
date search box. But i want to enter say todays date but retrieve the
results for exactly one month later.

E.G.
I if I enter 10-05-04 to 14-05-04 I want to see the records for
exactly 30/31 days later.

I was thinking could I manipulate the "Today'sDat e" function + 30days.
that way when I open the form to search for results, instead of seeing
today's date in the textboxes, I will see the date for a months time.

Kindest regards


Hello,

I'm confused too!!!

Why not just enter the dates you need in the
Starting and Ending date fields, which would
be the 30/31 days later you require?

Ray
Nov 12 '05 #3
Sorry Guys, I want to make the date search as dynamic as possible. You
see the thing is the user will only require the records from one month
ahead of the day that they are using the database.

And I also wanted to make it search for result over the period of a
week as opposed to one day, that's why I entered two dates.

so you'll will open the form and have two dates: 1=exactly 1 month
from todays date and 2= exactly 1week later than date 1.

So that all the user will see will be all records for a month in
advance over the period of a week.

therefore all the user has to do is click preview reports.

(Please note that this will only be the default value, if the user
then clicks in the date boxes they can search for what ever dates they
wish.)

I know I could build it without all this hassel, but as I said I want
to make it as user friendly as possible.

And thanks for the quick reply's. Oh! fredg I haven't had a chance to
try your suggestion yet but I did get to go through it and I think its
what I am looking for, so thank for your time and support. Its is much
appreciated.

Kindest regards.
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
6515
by: Mal | last post by:
Hello. I have a database that tracks reservations at a campground. I want to be able to make a calendar type report that shows how many people are here in given period. Stored for each reservation are dteReservationFROM (The date they come in) dtrReservationTO (The date they leave)
2
8394
by: Paul# | last post by:
how do i query for a record between two dates using Access 2000? right now Im doing this: SELECT * FROM tblDateTotal WHERE .<>0 And . Between 1/1/1901 And 10/10/2050;
3
11208
by: Lynn A. | last post by:
I have to perform an import from an excel file to Access. The file comes originally as a csv file. I have to delete some rows and columns, then change the formatting of some columns. I am using Windows 2000, Office 2000 I have been able to do everything but fill a column with zeros Here is some of the code attached to a command button, I am using, it works except I can't figure out how to fill down one column. In excel it uses the...
1
1068
by: tangokilo | last post by:
Hi, I am at a loss! So please excuse me as a true novice at this....!!! How can I compare dates in a windows form (not web form) using VB.NET and SQL 2000? For example, one date is blank (the ending date) the other (starting) date is 15 Feb 2004 for arguments sake. How do I do this and what methods can I use? Oh, I am also using Microsofts Data Access Block v2....
8
2174
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got answered... In 1.1 we always did our own myDataAdapter.fills and we liked that control for lots of good reasons. Now the new DataSource (or is it a TableAdapter:Dataset) automatically fills the Gridview. How can we control that fill? In a...
10
9878
by: John | last post by:
Hi I have a form with tow fields for dates in dd/mm/yyyy format. I am trying to use the fields in a query's where clause as below; "SELECT * " & _ "FROM Orders " & _ " WHERE Orders.)>= #" & Format(!!, "dd/mm/yyyy") & "# And Orders.<= #" & Format(!!, "dd/mm/yyyy") & "# "
1
15613
by: pitfour.ferguson | last post by:
My dbase has the start date and end date of each visit. How can I ask Access to list the day of the week of the start (easy), end (easy) and, more importantly, the dates of the visit itself - ie list the dates between the start and end date. Basically I am doing a day of the week analysis and need to know which day of the week is busiest.
4
3321
by: Jeff Goodman | last post by:
If there is a better newsgroup to post this in, please let me know. I am a relatively new VB.NET/SQL 2000 programmer. I am working with data imported into SQL2K from Access. Many of the dates are null, such as the terminate date with current employees. I have written the search function to find a certain employee, and now I am editing the selected records. Several of the fields are date fields, and I am trying to format them so...
5
2110
by: Dave | last post by:
Hello, I have a possible problem exporting a text field that happens to contain dates (but is not a date field) when using TransferText in MS Access 2000. I am exporting a query to a text file using TransferText in a module. One of my fields is a text field called "invoice description". This field may include any content including dates (e.g., 01/01/2006, 1/1/2006, 01/01/06, Invoice #1, Jan 2006, 293842, etc. are all
0
7876
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8003
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8234
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5739
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5408
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3859
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2385
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1478
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.