Automatically Fillin Date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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]
 
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.
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top