Results 1 to 3 of 3
  1. #1
    neo651 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2011
    Posts
    110

    Exception in unique field

    I have a database of computers and one of the fields is the user that is assigned to said computer. I want the user to be unique so that no user can be assigned to multiple computers.

    We only started this database after we'd already deploy hundreds of computers and my boss won't allocate time to gather data. So I have to go and find out which users are using which computers as I go along my normal day to day tasks. As a result I have to leave the User field blank on any computer I haven't figured out the user for yet. If I find that a computer does not have an assigned user I enter "Non-Specific" in the user field.



    So my question is can I make the "User" field unique except for when I enter "Non-Specific"?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    When you do your search, if you are looking for "Non-Specific", then don't search.

  3. #3
    drexasaurus's Avatar
    drexasaurus is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Location
    Santa Ana, CA
    Posts
    60
    What I do, and what you can do depending on how you deploy your database, is set up code in the startup routine to record user data in a server table. You can collect the computer user name as soon as a user gets the update and logs in using well, I would use a Windows API function, and have their computer save it to a table on the server. This would prevent you from going from computer to computer.

    Frankly, it's a good idea to have constraints on fields like this, but if your boss is being this specific about what is allowed and not, maybe you might have to give up that constraint until it can be applicable, unless you need to implement it right now--since it seems to be out of your control anyway. Just implement it as soon as you get the information--or--if you are horribly inneficient create code behind a form that enters this data to ensure that the new user being added isn't already in that table until you can create a more concrete constraint.

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

Similar Threads

  1. Restoring a lost field with a Unique Identifier
    By DBinazeski in forum Access
    Replies: 5
    Last Post: 12-20-2010, 08:02 AM
  2. An Unhandled win32 exception occurred in MSAccess.exe
    By Alice Liu in forum Import/Export Data
    Replies: 2
    Last Post: 12-08-2010, 01:40 PM
  3. Exception Reporting - Continued
    By shexe in forum Queries
    Replies: 11
    Last Post: 09-20-2010, 11:20 AM
  4. lost - linking date field based on a record with smaller Unique ID
    By stan.chernov@gmail.com in forum Queries
    Replies: 7
    Last Post: 09-16-2010, 02:22 PM
  5. Exception Reporting
    By shexe in forum Queries
    Replies: 16
    Last Post: 09-09-2010, 09:14 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