Mar 8 2012, 12:35 PM
I have two fields (data entry is at the form level) that need to work together.
In other words
BAFrom field - user enters data in this field and automatically populates the current date Date() into the field named BAFromUpdated
I am going to assume it would be an AfterUpdate code - just wondering the best code for that.
Thanks so much!!!
Mar 8 2012, 12:42 PM
That is your first name? <
You can accomplish this several ways.
1. At table level you can set the DefaultValue for the field to: Date()
2. In Form Design View-- you can set the Default Value of the Control to: Date()
3. In the AfterUpdateEvent of BAFrom
Me.BAFromUpdated = Date()
Mar 8 2012, 12:44 PM
think you pretty much got it. For example:
Private Sub BAFrom_AfterUpdate()
BAFromUpdated = Date()
Just my 2 cents...
EDIT: Oops, didn't see Cynthia's post earlier. Sorry for the duplicate info.
Mar 8 2012, 12:46 PM
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.Dirty = True Then
Me.BAFromUpdated = Now()
The above will update the BAFromUpdated field if ANYTHING has been changed in that record. You might want to consideer using Now instead of Date as Now gives the date and time.
Mar 8 2012, 12:47 PM
oing on my 'frig-- "typed faster than DB today!" <
Mar 8 2012, 12:51 PM
Going on my monitor: "Take a break, Cynthia's got the ball."
Mar 8 2012, 12:54 PM
Mar 8 2012, 12:58 PM
Thank you everyone!!!
will give it a try
Mar 8 2012, 01:01 PM
DB & I were happy to help!
Good luck with your project!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here