Results 1 to 4 of 4
  1. #1
    gbmarlysis is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    48

    auto populate based on three entries

    Hi,

    I would like to put a date in a form the region and then a staff code and based on the three entries then auto populate the remaining cells if those three have been entered together previously. Is this possible?
    Regards


    Luke

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,943
    Certainly, with enough code. The question is why? This appears to be duplication of data.
    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
    gbmarlysis is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    48
    Hi,

    Just the way I want it to run. I have certain data I want to enter if date, region and staff code are a certain combination. I would like to enter date, region and then staff code and if the three of them have been entered together before all the additional info I want to add to that combo will come up to show it has been entered already.

    Regards
    Luke

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,943
    What it really sounds like you want to do is check if the data combination already exists and if it does, go to that existing record. If it doesn't, then allow data entry for new record.

    One way to do this is to set the 3 fields in table as compound index - then Access won't allow duplicate entries and will notify user if they attempt to save record. However, if you want to catch this before user goes through all the data entry work, will need code.

    Code to look for existing data is fairly simple. The real trick is figuring out what event(s) to put the code into. Probably in the BeforeUpdate event of all 3 controls.
    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: 1
    Last Post: 08-05-2014, 12:40 PM
  2. Replies: 7
    Last Post: 03-02-2014, 03:16 PM
  3. Replies: 25
    Last Post: 01-25-2013, 10:26 AM
  4. Auto Populate based on Combo box
    By Mpike926 in forum Forms
    Replies: 16
    Last Post: 09-07-2012, 03:16 AM
  5. Replies: 3
    Last Post: 10-05-2009, 07:22 AM

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