Results 1 to 4 of 4
  1. #1
    subnet11 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jan 2012
    Posts
    3

    validate based on another value

    Hi All,

    I Am a new here, so I hope I am posting in the correct section. So here is my question with a little history : I have an Access Database. It has a field Track with 4 possible options (1,2,3,4). So right now when a user is filling in this field it happens that they miss a track. for e.g.
    1 = Ordered


    2 = Received
    3 = Sold
    4 = Closed
    Sometimes they forget to input the ordered before receiving. So I want to know how I can make a validation rule where 1 has to be done before 2 can be used, and 2 has to be done before 3 can be used etc etc.

    Thanks.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,953
    There is no expression possible for the ValidationRule property. This requires code that will check for data in existing records.

    Options:

    1. Take the decision away from the user. Automate with code. Code would check database for previous records and determine the appropriate option and inform user.

    2. User makes choice and code verifies afterward. If they goofed they get the digital equivalent of slap on the wrist.
    Last edited by June7; 06-11-2012 at 12:13 AM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    subnet11 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jan 2012
    Posts
    3
    Hi,

    How do I implement option 1. Sorry I am learning access.

    Thanks.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,953
    I don't know your data, forms, or business flow so can't be specific. It sounds like each option will have its own record. So does user click a button on one form (a menu?) to open the 'tracking' form? When does user select the customer and order this new 'tracking' record will be entered for? Perhaps code in the event for selecting the customer order can check the tracking table to find the last record for that customer and order and what option is in that record, if no records found then must be entering first option. A DMax function is a possible method.

    How much programming skill do you have? Review: http://office.microsoft.com/en-us/ac...010341717.aspx
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 5
    Last Post: 02-27-2012, 02:05 PM
  2. Validate Subfrom Data
    By mcktigger in forum Forms
    Replies: 2
    Last Post: 09-08-2011, 09:50 AM
  3. How to validate data using MS Access
    By maniii in forum Import/Export Data
    Replies: 2
    Last Post: 09-01-2011, 07:29 AM
  4. Validate Form Field based on Duplicate Data
    By bornfattom23 in forum Forms
    Replies: 3
    Last Post: 11-05-2010, 02:02 PM
  5. how to validate the first line of address
    By dunners92 in forum Access
    Replies: 1
    Last Post: 03-15-2010, 09:53 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