Expression question

AlfredNor

Registered User.
Local time
Today, 06:34
Joined
Sep 18, 2002
Messages
47
What syntax do I use to create a variable that = [ServiceDate] + 1 month?

Im trying to make a query that says return all records where [field1] (which is a date) is < [field2 + 1mth].

Can I merely say:
= [field1] < (dateadd("m",1,[field2]) ?

Any ideas? Ive looked in Help but come up with NADA.

THANKS.
 
Last edited:
I'll give it a try...

You sort of asked two questions:

1. How to make a variable which equals a particular date plus one month. This is (as you already seem to know):

varDate = DateAdd("M",1,[Service Date])

2. How to make a query which returns all records where [Date1] is older (aka less) than ([Date2] + 1 month).

You were very close with this, and you probably could have figured it out with trial-and-rtfm

Make a query where the criteria for [Date1] is:

<DateAdd("m",1,[Date2])

I'm a little puzzled about what this gives you, though. It tells you that Date1 is less than a month past Date2. But then, many things puzzle me.

-Curt
 
thanks

Thanks..I guess i should have just tried my best hunch, but thanks for the answer.

As for what this gives me...roll the highlights Jim!

I work for a CLEC in North Carolina. For those of you who dont know what that is, it's a class of companies that sell local phone service (here in america) at competitive rates to the grandaddy of them all AT&T. Technically Ma Bell was split into "Baby Bells" but they still have a virtual minority in rural areas so our industry was created. Basically we buy local service from BellSouth and resell it - actually cheaper than BellSouth can (or wants to I suppose.)

Well the problem is we have been experiencing LOTS and LOTS of trouble on our lines...very heavy static, no dial tones, features not available...and all USUALLY within the first month that someone switches over to our service.

Now Im not saying its sabotage....but we are using this very variable which you helped me create to build a case against them.
If 60% of our trouble tickets turn out to be within the first month of service....BOOM BANG...we got 'em.

Who says Access isnt material for a crime drama?! LOL

Thanks and take care.
 

Users who are viewing this thread

Back
Top Bottom