Results 1 to 2 of 2
  1. #1
    cman26 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2014
    Posts
    9

    Still Stuck - Filling multiple columns in a table from one combobox

    So I know how to have multiple columns fill a lookup in a combobox both from a table and a query. But I need to have the other fields that aren't saved by the combobox saved in the neighboring columns. So, my primary table is a master list of chemicals to be analyzed along with their respective registry numbers. I know what most of the programmers say about repetitive data being bad form etc. These names and registry numbers will NEVER change, so I'm not worried about a change causing problems later. I'm trying to build a separate tables that will have specific chemicals and the methods that they are analyzed under that effectively copy from the master list, but add their own quality control criteria. Further more, not all of my clients need all of the chemicals that are available for every method. It should be noted that not all chemicals are analyzed by the same methods and that some methods will have some of the same chemicals as others. I need the registry numbers because this is what the analysis software uses to uniquely identify each chemical and I need the name because names are easier for me. Long story short, I need both of these pieces together. It was suggested to have a macro copy the remaining columns from the dropbox in the table to the other columns in my table, but I'm not sure how to do this (I'm still very new to Access and my VB is very rusty). I understand how to do this for a form, but when client reporting lists become involved later on, this will make my database very bloated to have a form to populate each respective table. Can someone suggest some code to copy the additional fields from the combobox into additional columns in the method and eventually client list tables that will be created. Thank you.

  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,825
    Must use a form bound to the table where you want to save the data. Code in the combobox AfterUpdate event that references column index of the combobox. Index begins with 0. I don't use macros, only VBA.

    Me!fieldname = Me.comboboxname.Column(x)

    Should not be multiple client list tables. Have one table with a field for the ClientID.
    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: 5
    Last Post: 02-12-2014, 11:52 PM
  2. ComboBox not listing multiple columns
    By tylerg11 in forum Forms
    Replies: 3
    Last Post: 09-26-2011, 11:24 AM
  3. Problem filling textboxes from combobox
    By reidn in forum Forms
    Replies: 1
    Last Post: 06-23-2011, 05:06 PM
  4. Filling a combobox with field names.
    By millerdav99 in forum Access
    Replies: 1
    Last Post: 04-26-2011, 02:09 PM
  5. ComboBox with multiple columns
    By rkm360 in forum Forms
    Replies: 10
    Last Post: 05-14-2010, 01:19 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