Data Validation

N

Nick Bradbury

Hello

I have a form to enable order details to be entered, some products have a
"Standing_Charge", in these cases the "Rental_Period" must also be entered
otherwise the cost is not calculated correctly. How can I alert the user to
enter this value and to ensure that that a value is added if a
"Standing_Charge" is applied.

Thanks

Nick
 
J

Jeff Boyce

Nick

If you add code to the [Standing_Charge] field's AfterUpdate event, you
could:

1. ensure that a valid value/choice had been made
2. add a message indicating that the [Rental_Period] field must be filled
in
3. set the focus to (?and highlight) the [Rental_Period] field

To ensure that the entire transaction doesn't finish without the above, you
could add code to the form's BeforeUpdate event to check on the
possibilities.
 
K

Klatuu

Use the Before Update events of the controls you need to validate. It will
take some VBA to get it done.
 
Top