Results 1 to 8 of 8
  1. #1
    BatmanMR287 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jan 2014
    Posts
    69

    Combo Box

    Hello All!
    I need to take the value from a combo box and send it to a temp table. Any ideas?



    Thank you for your time!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Options include using the AddNew method of a recordset or executing an append query.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    BatmanMR287 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jan 2014
    Posts
    69
    @pbaldy
    Got it to work with an append query that used another query to retrieve what was in the combo box. Now, there are two other fields that the user enters (date, and a short memo). I have these dumping into a temp table from the form. The problem now is that the number coming in from the combo box is being saved in the temp table on a different row than the other two pieces of data. I need to have all three pieces of data on the same row so I can save them to the main table.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Why not bind the combo to its respective field?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    All 3 fields should be in the same action. Post the query sql statement.

    Why are you using a temp table?
    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.

  6. #6
    BatmanMR287 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jan 2014
    Posts
    69
    The table is a policy that gets updated periodically with a new update that needs it's own row in the table. It is a many table, the one table was where I was getting the policy number from. The temp table is to combine the policy number with the new update then send to update table as a new row entry. I actually got that to work now.

    New problem: I have a many table that has a combo key of policy number and administrative procedure number. There can be more than one of the same policy number with ascending AP numbers. I need to set up a combo box that filters out the additional duplicate policy numbers. Example: policy 4170 has 8 entries 1-8, in the policy number combo box I only need one 4170 to show. Can I filter the combo box to only show one of each policy numbers? I will have a subform show the AP entries with a different combo box for AP's.

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Maybe use DISTINCT keyword.

    SELECT DISTINCT policy FROM tablename;
    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.

  8. #8
    BatmanMR287 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jan 2014
    Posts
    69
    @June7
    Distinct worked like a charm. Thank you very much June!!

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

Similar Threads

  1. Replies: 2
    Last Post: 10-21-2014, 07:57 AM
  2. Replies: 3
    Last Post: 07-03-2013, 10:38 AM
  3. Replies: 1
    Last Post: 10-30-2012, 10:29 AM
  4. Replies: 2
    Last Post: 08-16-2012, 10:02 PM
  5. Replies: 4
    Last Post: 08-16-2011, 05:54 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