Results 1 to 5 of 5
  1. #1
    funkygoorilla is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    93

    Query results to include descriptions

    Hi,


    I created a query that pulls all corresponding data according to an ID number that is entered by a user. The data then goes into a form, and is editable by the user. My issue is that some of the information pulls up the ID numbers of the users selections who put it in, in the first place. For example, if a user put in Arizona, from a table called states. The query I built pulls up the ID number of the entry for Arizona in the states table and not the word, Arizona. I know how to setup the query to pull up Arizona, but when someone changes that entry, it changes the actual name in the states table, and not the data entered by the user. Is there a way to set this up, where you can still display the name in the query, but change the data in the correct table?

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    You should probably not be entering data directly into a table. Use a form that is bound to the table and this will not happen. As to the query, join the table with the lookup information to the main table and show the results for the lookup table and uncheck the box in the query for the ID in the main table.

  3. #3
    funkygoorilla is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    93
    Hi, thanks for your reply. I do use a form that displays the information queried. Can you elaborate on what you suggest for the query though? In my query, if I link the main table to the lookup table, then the information that is queried, pulls up the names from the lookup table. That is my desired result, however, when the user changes any of that information if they put it in wrong in the first place, that field will change the information in the lookup table as well. I want it to change the information in the main table only, but I can only get the IDs to display in that scenario.

  4. #4
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    I am a bit confused. In your form, are you using a combo box? Is it set to not allow items other than what is in the list. If so, then your users should not be able to make any changes unless the item is in the look up table. If your lookup table is bound to the ID (a number), then this is what should appear in your main table.

    Per chance, do you have your lookup in your main table and not in your form? This is a no-no. Look here about that

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

    Alan

  5. #5
    funkygoorilla is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    93
    Hi, thanks again for the reply. I went with your suggestion of using combo boxes for the fields instead of having the user type them in. I also set it to not allow editing of the list. The issue was a little confusing but in the end I got a solution. Thanks again!

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

Similar Threads

  1. Replies: 6
    Last Post: 05-14-2012, 07:24 AM
  2. Replies: 3
    Last Post: 01-05-2012, 12:04 PM
  3. Include zero values in below query!
    By daffykyle in forum Access
    Replies: 3
    Last Post: 11-30-2011, 08:56 AM
  4. Replies: 1
    Last Post: 11-07-2011, 11:42 AM
  5. Add descriptions for make table queries
    By HurrMark in forum Access
    Replies: 0
    Last Post: 12-30-2008, 08:29 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