afterupdate problem

banza

Registered User.
Local time
Tomorrow, 01:10
Joined
Jul 2, 2005
Messages
11
Hello Access friends,
I have an unbound date field named txtDate with the following afterUpdate event.
When I manually write the date the AfterUpdate works fine but does not work (the lblStock field doesn't get the value in the txtDate field) when I populate the txtDate field from a pop up calendar.
What is the problem with the code?
Thanks in advance for pointing me to the right direction.

Private Sub Form_Current()
Me.lblStock.Caption = "Stock at " & Me.txtDate
End Sub

Private Sub txtDate_AfterUpdate()
Me.lblStock.Caption = "Stock at " & Me.txtDate
End Sub
 
I could be wrong but I don't think the AfterUpdate event fires when you change the control programatically. Use the Exit or LostFocus event instead.
 
the lostfocus event

thanks Ruralguy, the lostfocus event solved it.
 
Great! Thanks for posting back with your success.
 

Users who are viewing this thread

Back
Top Bottom