How to automaticaly populate another date

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

Guest

I know how to do this in excel but can't figure it out in access. I want it
so that when a users inputs data into one field the date (of when he put in
the data) populates another field.

Please help
Thanks!
 
Hi Greg

The control that the user is entering data into has an AfterUpdate event
which means that you can tell your system to do "something" after the field
is updated.

Open the form in design view and select the field that will have data
entered into it.

Right click and open the properties box.

In the event column select AfterUpdate

Clic build option (...) and select code

You will see something like this

Private Sub NameOfControl_AfterUpdate()

End Sub

Yo need to add one small line of code so that it looks like this

Private Sub NameOfControl_AfterUpdate()
Me.NameOf2ndControl = Date
End Sub


"NameOf2ndControl" is the name of the control you want the date to appear in
after the first control is updated - so you will need to alter this code to
the correct control name.

Hope this helps
 
Thank you so much, That worked perfectly
lol For some reason I was totaly oblivous to the AfterUpdate Event

Thanks!
 

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