473,383 Members | 1,815 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,383 software developers and data experts.

What Criteria to enter for a field "Service Date" and filter by this date and after?

Daniel B
I have a query that contains a "Service Date" field. I would like to form a Criteria statement to be able to enter any date (such as... 1/1/2011). I would then like to be able to run the query and see values between the entered date (1/1/2011) and the current date.

Is there a way of doing this by enter in the Criteria for the "Service Date" field?

Any help is much appreciated!

Daniel B.
Aug 9 '11 #1

✓ answered by Rabbit

In the criteria, you can put
Expand|Select|Wrap|Line Numbers
  1. BETWEEN CDate([Enter Start Date]) AND Date()

4 1987
Narender Sagar
189 100+
Hi Daniel,
You can create a Form ("Dialog"). Create two Unbound fields in the form : 1. "BeginningDate" and 2. "CurrentDate". Set default value of "CurrentDate" as Date(), and you can choose any date for your field BeginningDate .
Now you can create a query and in the criteria you can give following expression: Between [Forms]![Dialog]![BeginningDate] And [Forms]![Dialog]![CurrentDate]. So you will get result as you required. You can even write some VBA codes for more controls (Like users should not be able to select date which is in future or some other checks like that..
Aug 10 '11 #2
Rabbit
12,516 Expert Mod 8TB
In the criteria, you can put
Expand|Select|Wrap|Line Numbers
  1. BETWEEN CDate([Enter Start Date]) AND Date()
Aug 10 '11 #3
Thank you Mr. Rabbit, I was really hoping it was something simple like that!

Daniel B
Aug 10 '11 #4
NeoPa
32,556 Expert Mod 16PB
There is absolutely nothing wrong with Rabbit's answer, but maybe the question could do with some attention.

Assuming all the values in the table for [Service Date] reflect historical (and current) dates - IE. None are future dates - as would appear reasonable, why is the question not about finding [Service Date]s on or after a specified date?

Expand|Select|Wrap|Line Numbers
  1. [Service Date] >= [Enter Start Date]
Aug 10 '11 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Martien van Wanrooij | last post by:
I would like to retrieve, let us say, the First Monday after a certain date, so my (imaginary) function could be something like echo weekdayAfter("28 July 2005", "Monday") should return "1 August...
4
by: S. van Beek | last post by:
Dear reader, By a Date field with Now() as default value the content of the field is date plus time. As I need a filter in a query on date only (excluding time) I invented the following...
5
by: lottaviano | last post by:
I am using Access 2002 and have two tables (Main and Actions) linked (in Relationships) on one field "CAL_ID" (primary key in Main Table). Main Table is a list of equipment. Actions Table lists...
3
by: | last post by:
Hello, I am hoping someone else has thought about a date time calculation i need to perform. I would like to be able to calculate the number of "working minutes" between 2 dates, given my...
12
by: Assaf | last post by:
Hi all, My client is using an online service provider that processes survey responses. After a user fills survey.aspx and presses the OK button, 2 things need to happen: 1. the data has to...
6
by: fonzie | last post by:
Is there any way to include two unbound text boxes (for a start date and end date) to a filter-by-form? The users may want to filter by several different fields and they may want to include a date...
0
by: Si | last post by:
Hi, I'm working on a small project - a website with some access to DBs, etc. On my dev PC, all works fine. But on the hosting machine, after a short while, I get "Service Unavailable" and...
23
Dököll
by: Dököll | last post by:
Hey Gang! I am sure thi is simple and will find answers here. Can't do so as of now, but will when I get home> It looks like below code is not allowing me to set it so Contact date canot be...
5
by: martin DH | last post by:
Morning, Here's my problem: I have a field (ResFileLocation) on a form (frmResolution) that inserts a record-specific value (record ID, date stamp, etc) through vba when it has gained focus. ...
45
AccessIdiot
by: AccessIdiot | last post by:
Sorry, wasn't sure how to phrase the question but here's the situation: I have a form that allows a user to apply a variety of filters to a report. One of the filters is a date range where user...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.