Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2009
    Posts
    5

    Referencing table data in field validation rule

    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!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    This type of validation is not done at the table level but rather in the data entry form. I personally do *all* of my validation in the Entry Form including "Required Field".

  3. #3
    Join Date
    Mar 2009
    Posts
    5
    Quote Originally Posted by RuralGuy View Post
    This type of validation is not done at the table level but rather in the data entry form. I personally do *all* of my validation in the Entry Form including "Required Field".
    Thanks for your input!

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You're welcome and enjoy the rest of the project.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Data won't show up in table field
    By texzen123 in forum Forms
    Replies: 3
    Last Post: 11-26-2009, 11:20 AM
  2. Validation Rule: Date
    By krymer in forum Access
    Replies: 0
    Last Post: 08-27-2008, 03:30 PM
  3. Validation Rule
    By mistaken_myst in forum Database Design
    Replies: 2
    Last Post: 10-29-2007, 02:08 PM
  4. Validation rule for a text field
    By wasim_sono in forum Forms
    Replies: 4
    Last Post: 03-14-2006, 11:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums