K
Karen Hagerman
I am textbox.oldvalue to save the previous value in a textbox so I can have a history of edits to a record. If the record is, however, a new record, the Null value of .oldvalue is generating runtime errors:
The following If-Then-Else comes up with a runtime error of '94': Invalid use of Null
If txtName.Oldvalue = Null Then
NameOldValue = "New Record"
Else
NameOldValue = txtName.OldValue
End If
This other If-Then-Else comes up with a runtime error of '424': Object Required
If txtName.Oldvalue is Null Then
NameOldValue = "New Record"
Else
NameOldValue = txtName.OldValue
End If
How can I test for Null without generating a runtime error OR is there a better test to apply if it is a new record that is being populated? Any help will be appreciated.
Karen
The following If-Then-Else comes up with a runtime error of '94': Invalid use of Null
If txtName.Oldvalue = Null Then
NameOldValue = "New Record"
Else
NameOldValue = txtName.OldValue
End If
This other If-Then-Else comes up with a runtime error of '424': Object Required
If txtName.Oldvalue is Null Then
NameOldValue = "New Record"
Else
NameOldValue = txtName.OldValue
End If
How can I test for Null without generating a runtime error OR is there a better test to apply if it is a new record that is being populated? Any help will be appreciated.
Karen