J
JonOfAllTrades
Good morning. I have a fairly simple question, hopefully someone here
has seen it.
I have a form used for data entry. There is an HoursWorked control,
bound to a numeric field. Often, a user needs to enter hours from multiple
line items. They can do this by adding the hours in Excel, Calculator, a
separate control with Eval(), or of course a physical calculator, and then
entering the total.
I would like to engineer it such that a user can type either "4.5" or
"1.5+2+1" and the control will understand the value as 4.5. I added Control
= Eval(Control) to BeforeUpdate. However, it seems Access is verifying the
format of the input before BeforeUpdate runs; it complains about the value
entered not being numeric. If I enter simple numeric data, the code tries to
run but throws an error "The macro or function set to the BeforeUpdate or
ValidationRule property for this field is preventing Access from saving the
data in this field."
I could create a separate unbound control, but in that case they might
as well use their favorite Casio or TI.
Any suggestions?
Thank you!
Win XP/Access 2K
has seen it.
I have a form used for data entry. There is an HoursWorked control,
bound to a numeric field. Often, a user needs to enter hours from multiple
line items. They can do this by adding the hours in Excel, Calculator, a
separate control with Eval(), or of course a physical calculator, and then
entering the total.
I would like to engineer it such that a user can type either "4.5" or
"1.5+2+1" and the control will understand the value as 4.5. I added Control
= Eval(Control) to BeforeUpdate. However, it seems Access is verifying the
format of the input before BeforeUpdate runs; it complains about the value
entered not being numeric. If I enter simple numeric data, the code tries to
run but throws an error "The macro or function set to the BeforeUpdate or
ValidationRule property for this field is preventing Access from saving the
data in this field."
I could create a separate unbound control, but in that case they might
as well use their favorite Casio or TI.
Any suggestions?
Thank you!
Win XP/Access 2K