Unanswered: Validation rule that restricts entry if another field Is Not Null or = 0
I have begun desiging a database for my company that stores information about parts we produce for our customers. I am relatively new to Access.
Sometimes customers parts have dimensions given in inches, while other times they are given in millimeters. I would rather have a query do the conversion to inches than the person doing it prior to inputting data.
Here is how I was planning on handling this:
I have a table with the following fields:
When the query is ran, I use an Iif to see whether MM was inputted and if the user inputted in MM, it creates a new field that converts to inches.
However, here is where I need help. I would like a validation rule to only allow Thickness(In) or Thickness(MM) to be inputted. For instance, if the user inputs a value for Thickness(In), I would like Access to prevent the user from inputting Thickness(MM) (unless Thickness(In) is null or =0).
Replacing [Thickness(MM)] and [Thickness(In)] by the names of the corresponding controls in your form. This could be included in a function that you would call from the AfterUpdate event of both textboxes.