DateAdd maybe? (1 Viewer)

Design by Sue

Registered User.
Local time
Yesterday, 18:15
Joined
Jul 16, 2010
Messages
666
It has been a while since I worked in Access so I am definitely rusty!. I need to add a field to a query that takes a date field (CompletedDate) and adds the number of months listed in another field (Expiration). The original fields are in different tables but are combined within this query. This is really basic stuff for many of you but I am not getting it. Can someone possibly help me? The more specific your reply the happier I will be/

Thanks
 

plog

Banishment Pending
Local time
Yesterday, 20:15
Joined
May 11, 2011
Messages
11,665
You're on the right track, just keep going.


As long as both fields are available in the query, and one is a date and one is a number you just use DateAdd like so:

NewDateFieldName: DateAdd("m", [FieldWithNumber], [FieldWithDate])

The only issues is null values in either of your fields, in which case you would need to handle them with a default value.
 

Design by Sue

Registered User.
Local time
Yesterday, 18:15
Joined
Jul 16, 2010
Messages
666
I got it working!!!! I was not far off.
 
Last edited:

Users who are viewing this thread

Top Bottom