Results 1 to 5 of 5
  1. #1
    Adam7 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2012
    Posts
    20

    LookUp for a combo box?

    Hi all,

    I haven't used access properly for years so the problem I have probably has a very simple solution that I have completely forgotten about.

    I am adding a field to my database called "category" and another next to it called "code" which is a unique code to each category.

    The "category" field is a combo box that lists about 500 categories. How can I make it so that when I select a category from the combo box, the "code" field automatically changes to the relevant code? I'm sure it requires some sort of lookup from a table but just can't remember.

    It's probably really simple but any help would much appreciated!



    Thanks,

    Adam.

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    I think that this is what you are looking for.

    http://www.baldyweb.com/Autofill.htm

    Make sure that you do your lookups in a form and not directly in a table.

    http://access.mvps.org/access/lookupfields.htm

  3. #3
    Adam7 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2012
    Posts
    20
    Thanks for your reply Alan.

    So far, I have a working autofill on my form.
    My only problem now is that when the field is "autofilled", it does not update on the table. Usually this wouldn't be a problem but a few people at work prefer to view everything in table view so it is vital that when one of the categories/codes is selected on the form, it updates the table.

    Would you be able to explain how I would go about doing that?

    Thanks alot,

    Adam.

  4. #4
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Your users should not be allowed to look at your tables. If you wish to simulate a table view in a form, then use a datasheet view for your form. The data will appear as it is in a form, but looks like a table.

  5. #5
    Adam7 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2012
    Posts
    20
    Ok then, will have to make do with datasheet view.

    Thanks for all your help!

    Adam.

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

Similar Threads

  1. Combo Box Lookup
    By mossj in forum Forms
    Replies: 1
    Last Post: 12-01-2011, 05:10 PM
  2. Replies: 1
    Last Post: 07-19-2011, 06:09 PM
  3. Month/Year lookup for combo box
    By Buakaw in forum Forms
    Replies: 7
    Last Post: 03-01-2011, 09:49 PM
  4. Combo Lookup
    By b123 in forum Forms
    Replies: 1
    Last Post: 02-24-2011, 11:24 AM
  5. Combo box lookup confusion
    By redpenner in forum Forms
    Replies: 5
    Last Post: 08-19-2010, 08:45 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