Automatic Date Query

othmanyg

Registered User.
Local time
Today, 16:40
Joined
Feb 1, 2000
Messages
43
Hi, Can you please help me on this ASAP,

In a form, I have two date fields (AssignedDate & ToBeCompletedDate). What i want is whenever i enter the Assigned date, the ToBeCompletedDate field is automatically filled out with a date that is A WEEK AFTER THE ASSIGNED DATE.

I'm sure I can use After Update Even of the AssignDate Field, but how?

I appreciate this help very much.

Good day,
;)
 
You don't need vba, just set the control source of ToBeCompletedDate to =DateAdd("dd",7,[AssignedDate])
 
Thank Rich very much, but i think there is a slight problem, i did what you told me, but i get #Error in the ToBeCompleted Field. What can i do to fix the problem? By the way i have an input mask and i removed it but i still get the same #Error?

Thanks very much
 
I think Rich's solution works, but until the ToBeCompleted Field is updated, it will show as #ERROR.

Dave E
 
Put this line in the AfterUpdate event of AssignedDate:-

Me.ToBeCompletedDate = DateAdd("d", 7, Me.AssignedDate)
 
Oops sorry about the typo, should of course be =DateAdd("d",7,[AssignedDate])
 
It works fine

Hi,

Thanks very much for both of you, it workd, this is excactly what i needed.

This is really a very nice Forum that i like to spend hours reading through.

Thanks,
 

Users who are viewing this thread

Back
Top Bottom