rockman
Senior Member
- Local time
- Today, 15:00
- Joined
- May 29, 2002
- Messages
- 190
I get an error, "The macro or function set to the BeforeUpdate or ValidationRule property for this field is preventing MyDatabase from saving the data in the field.", when I run the following code:
Apparently, Access doesn't like me reassigning txtHeight's value within the BeforeUpdate event. Anyone have an idea on how I can accomplish this task?
Thanks,
Jeff
Code:
Private Sub txtHeight_BeforeUpdate(Cancel as Integer)
If Instr(1,txtHeight.Text,"in") then txtHeight.Text=Val(txtHeight.Text) * 2.54 & " cm"
End Sub
Thanks,
Jeff