searching table for dates due

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two tables called "Vehicle" and "inspection" in this table there is a
field called "Next due" which is a general date. I wish to write a query to
find any records where the "next due" is in the next day, week or month say.
(What would of course be better is if the user could enter the period of
thier choice).

Any help would be much appreciated.
Ian
 
If you're willing to have them always enter the number of days, you could
use

WHERE [Next Due] BETWEEN Date() And DateDiff("d", [Number Of Days?], Date())

Another option is to have them enter the actual date they want to look up
until:

WHERE [Next Due] BETWEEN Date() And [End Date?]

A third (somewhat friendlier) option would be to have a form of your own
that appears, and use a calender control to let them pick the date of
interest:

WHERE [Next Due] BETWEEN Date() And Forms!NameOfForm!NameOfControl

The form could also be set to allow them to pick a unit (number of days,
number of weeks, number of months) from a combo box and enter a number to
use with that.
 

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

Similar Threads

Due Dates 3
Calculating Due Date 5
Table/query layout trouble 2
Due date 4
Find Bad Debtors: Show select data from query 6
Help on Calendar Issue 1
DMax expression 2
Due date and count down 1

Back
Top