By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,665 Members | 1,430 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,665 IT Pros & Developers. It's quick & easy.

OldValue peoperty on controls = Not working if controls have no data or Null

P: 52
I have these on BeforeUpdate event of a control

If Me.txtAddress.Value <> Me.txtAddress.OldValue Then
Me.txtGenInfo_UpdatedOn = Now
Me.txtGenInfo_UpdatedBy = fOSUserName
gRecordChange1 = True
End If

However the OldValue property does not work if the control or textbox doesn't have value or null. It also does not work in data entry as there is no previous value to check except a null value or blank data. Does any guy knows any workaround on these?
Sep 19 '06 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 1,418

So try:

If nz(Me.txtAddress.Value) <> nz(Me.txtAddress.OldValue) Then

Sep 19 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.