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

auto fill two fields base off a date

P: 1
What I have is three fields ... EPIC Date, Shipping Date, Email Date
What I want to do is from the date in "EPIC Date" have it auto fill the other two fields. the shipping date should be 14 days before the "EPIC Date" and the Email Date should be 3 days
Feb 11 '14 #1
Share this Question
Share on Google+
3 Replies


100+
P: 294
Look into the
Expand|Select|Wrap|Line Numbers
  1. DateAdd()
function.

http://office.microsoft.com/en-us/ac...001228810.aspx

So on the AfterUpdate event on the EPIC Date "field", use the DateAdd() function to add dates into your other two fields based on what you already know.
Feb 12 '14 #2

zmbd
Expert Mod 5K+
P: 5,287
Any reason why you are storing the calculated data?
Normally one would do this in the query with a calculated field, only storing something like the actual shippment date for record keeping.
Feb 12 '14 #3

NeoPa
Expert Mod 15k+
P: 31,186
MCupito points you in the right direction for the how, but, like zmbd, I'd advise that you don't store calculated data in a database. Calculate it when needed instead.

For more on this see Database Normalisation and Table Structures.
Feb 13 '14 #4

Post your reply

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