Referencing table data in field validation rule

  • Thread starter toad848 via AccessMonster.com
  • Start date
T

toad848 via AccessMonster.com

Hello,

I am using Access XP (2002) SP3. I've created a table that is to store the
details of certain shipments. Some shipments are measured in terms of pieces
shipped, whereas in other cases the shipment is measured in kilograms. This
being the case, I have one field called 'MeasurementUnit' that contains the
measurement unit (i.e. pieces or kilograms) and another called 'Quantity'
that contains the number of units shipped. I want a validation rule for
'Quantity' that disallows fractional numbers if the field 'MeasurementUnit'
for that record contains the value 'pieces'. For this, I believe that I'd
need to reference, in the validation rule, the value contained in the
MeasurementUnit field of the current record. How is this done?

I'd much appreciate any help.

Thanks!
 
T

toad848 via AccessMonster.com

Thanks, Allen. I wasn't familiar with validation rules for tables. This
concept is going to help me out not just here, but elsewhere as well.

Thanks again.

Allen said:
To compare values between fields, use the validation rule of the table, not
that of a field.

Details and examples:
http://allenbrowne.com/ValidationRule.html#TableValidationRule
I am using Access XP (2002) SP3. I've created a table that is to store the
details of certain shipments. Some shipments are measured in terms of
[quoted text clipped - 10 lines]
need to reference, in the validation rule, the value contained in the
MeasurementUnit field of the current record. How is this done?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top