Results 1 to 5 of 5
  1. #1
    memmons is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2012
    Posts
    2

    Combo Box auto fill and update table


    I am sure this is a super simple question. I am new to access and have created a database with multiple tables to record information about specific vendors. Each vendor has an assigned vendor number that I want to follow them to each table. I created a form associated with the contracts table, it has a combo box which looks a the vendor table and when you select the vendor you want it auto populates the vendor number text box. Once you have finished filling in the rest of the form and move to the next record it adds everything to the table except the vendor number. The vendor number text box control source is set to =[cboVendor].[column](2). What am I missing here is there some coding that I need to do? Thanks in advance for any help - Marc

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Does this help?

    BaldyWeb - Autofill
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    memmons is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2012
    Posts
    2
    Thanks!! That solved my issue

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help, and welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Quote Originally Posted by memmons View Post
    The vendor number text box control source is set to =[cboVendor].[column](2). What am I missing here is there some coding that I need to do?
    In order for a control to save a value to a field in a table, the control must be bound to the field. You have an unbound text box because the control source is "=[cboVendor].[column](2)"; it should be something like VendorID_FK (or whatever your field name is).

    You could use the after update event of the vendor combo box to enter the vendor ID, or the form Before update event.
    In either case, the line would look like:

    Me.VendorID_FK =[cboVendor].[column](2)

    (change VendorID_FK to your field name)


    my $0.02.....

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

Similar Threads

  1. auto fill text box from dependent combo box
    By tommyried in forum Access
    Replies: 6
    Last Post: 06-17-2012, 03:55 PM
  2. Replies: 3
    Last Post: 03-21-2012, 01:43 PM
  3. Creating a auto fill from a combo box
    By Trina76 in forum Forms
    Replies: 4
    Last Post: 02-07-2012, 02:43 PM
  4. Replies: 3
    Last Post: 10-13-2011, 04:42 PM
  5. Auto fill a table?
    By newtoAccess in forum Access
    Replies: 3
    Last Post: 11-21-2009, 08:21 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