Date Problem...

  • Thread starter Thread starter Raymond van der Meer
  • Start date Start date
R

Raymond van der Meer

Hi,

I 've got a table with some records. In one of the fields there's a date,
I'm trying to get a query wich gives me a selection of records with the
following criteria:

show all the records where DATE = between NOW and 2 months forward.

I've looked everywhere, but haven't got a clue... I don't know VBA, so I
think
it has to be done with expressions.

Can anyone help me or give me a hint? :)

Thanx in advance!

Raymond (the netherlands)
 
SELECT * FROM TableName
WHERE [Date] Between Date() And
DateAdd("m", 2, Date());


Also, do not use Date as the name of a table's or query's field. It and many
other words are reserved words in ACCESS, and can create serious confusion
for ACCESS and Jet. See these Knowledge Base articles for more information:

List of reserved words in Access 2002 and Access 2003
http://support.microsoft.com/default.aspx?scid=kb;en-us;286335

List of Microsoft Jet 4.0 reserved words
http://support.microsoft.com/?id=321266

Special characters that you must avoid when you work with Access
databases
http://support.microsoft.com/?id=826763
 
Already answered in another newsgroup to which you posted the same question.

If you feel you need to post to more than one group (HINT: it's seldom
necessary), please have the courtesy to cross-post (send the one message to
all groups at once), rather than multi-post (send individual messages to
each group). In this way, all responses to your post will be available
together, regardless of what group the responder was in, and the rest of us
won't have to read your post multiple times. (It also uses fewer server
resources)

I see you're using Outlook Express. Click the "Newsgroups:" label to the
left of the box containing the name of the current newsgroup. That will open
a dialog that will let you add additional newsgroups to your post.

Note that it's generally consider to be A Bad Thing to cross-post to more
than about 2 or 3 newsgroups. (In fact, at
http://www.microsoft.com/presspass/features/2001/Mar01/Mar27pmvp.asp
Microsoft suggests that "One group will suffice")
 
Hi,

I 've got a table with some records. In one of the fields there's a date,
I'm trying to get a query wich gives me a selection of records with the
following criteria:

show all the records where DATE = between NOW and 2 months forward.

I've looked everywhere, but haven't got a clue... I don't know VBA, so I
think
it has to be done with expressions.

Can anyone help me or give me a hint? :)

Thanx in advance!

Raymond (the netherlands)

This was asked and answered in m.p.a. forms.

Please do not multi-post. If you feel you must post the same question
to more than one newsgroup (and it's seldom necessary), cross-post by
adding each additional newsgroup in the To Newsgroups: box, separated
by a comma.
This way an answer in one newsgroup will be seen in each of the
others. More readers will see the response and learn, and less time
will be spent on duplicate answers.

See Netiquette at http://www.mvps.org/access

It's a great site to visit anyway.
 
Hi Doug and Fred,

I'm sorry for the Multi-post, it won't happen again!

I'm kinda new with this...

Greetz,

Raymond
 
Back
Top