By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,652 Members | 1,842 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,652 IT Pros & Developers. It's quick & easy.

Calculate future date in access 2007

P: 2
On my form, I need to be able to have Access autocalculate a 3-month followup:

This is what I have so far:

My field "Web Reviewed Date" and an unbound text box for 3-month follow-up (next review date in my main table)

In the unbound textbox control source, I have put the code =DateSerial(Year([Web Reviewed Date]),Month([Web Reviewed Date])+3,Day([Web Reviewed Date])).

This works just fine.

But I cannot figure out how to tie the unbound text box into my main table for reporting and querying. Please help!
Jan 31 '08 #1
Share this Question
Share on Google+
2 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
On my form, I need to be able to have Access autocalculate a 3-month followup:

This is what I have so far:

My field "Web Reviewed Date" and an unbound text box for 3-month follow-up (next review date in my main table)

In the unbound textbox control source, I have put the code =DateSerial(Year([Web Reviewed Date]),Month([Web Reviewed Date])+3,Day([Web Reviewed Date])).

This works just fine.

But I cannot figure out how to tie the unbound text box into my main table for reporting and querying. Please help!
In the form open event you will need to check the system date against this date.
Feb 5 '08 #2

missinglinq
Expert 2.5K+
P: 3,532
Actually, Access has a function for adding to dates called, oddly enough, DateAdd().

= DateAdd("m", 3, [Web Reviewed Date])

is all you need.

As to "tying it into your main table" you really shouldn't. Instead, you should simply use the same function in a calculated field in a query, using this calculated field in forms/reports when needed. In a blank field in the Query Design Grid enter

FollowUpDate: DateAdd("m", 3, [Web Reviewed Date])

Then in forms/reports simply refer to FollowUpDate, comparing it, as Mary said, to the computer's system date. Welcome to TheScripts!

Linq ;0)>
Feb 5 '08 #3

Post your reply

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