Automatically Fillin Date

  • Thread starter TotallyConfused
  • Start date
T

TotallyConfused

I currently have two date fields date 1 and due date. When I click (even
procedure) on date 1 it fills it with Date() (event procedure). When I click
on due date, it fills it with date + 7. This works okay but sometimes if you
forget to click on due date it goes blank. Is there a way that it can be
filled automatically when date 1 is clicked on? Thank you in advance for any
help you can provide.
 
S

StrayBullet via AccessMonster.com

On AfterUpdate of [date 1], you can automatically fill [due date] with:

Me.due date = Date() + 1

Or...

You can automate both by using:

On Current form event:
Me.date 1 = Date()
Me.due date = Date() + 1

You may have to bracket the control names due to the spaces ex: [date 1]
 
R

ruralguy via AccessMonster.com

You can use the AfterUpdate event of the Date1 control to complete the
DueDate control.
Me.DueDate = DateAdd("d",7,Me.Date1)
...using your control names of course.
I hope you are not wasting disk space saving the DueDate.
 
C

Carl Rapson

In the Click event of date 1, set the value of the due date field also. You
can do both in the same event procedure.

Carl Rapson
 
T

TotallyConfused

Thank you very much. Its works great!

Carl Rapson said:
In the Click event of date 1, set the value of the due date field also. You
can do both in the same event procedure.

Carl Rapson
 
Top