Results 1 to 6 of 6
  1. #1
    Kinder0177 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2011
    Posts
    3

    Save Combobox results to Table

    I've currently got a combobox that populates several empty field on my form. The Combo is pointed at the ExternalContractor_T however i want to save one of the newly populated fields to the table that my form is pointed at.
    I've tryed:

    Me.ID = Me.Combo1(0)

    and the code i use to populate my fields is e.g



    =[Combobox].[Combo1](0)

    Is this possible and if so how can i do it?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Use the ComboBox's AfterUpdate event to populate the other *bound* controls instead of putting a formula in the ControlSource of those other controls.

  3. #3
    Kinder0177 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2011
    Posts
    3
    Thanks but i'm quite a novice at Access and i'm unsure what you mean.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    If you have: Me.YourTextBox = Me.ComboBoxName.Column(0) in the afterUpdate event of the ComboBox then when you make a selection in the ComboBox, the YourTextBox control on your form will get the value of the 1st column in the RowSource of the ComboBox. Of course you would need to use the names of your controls for this to happen.

  5. #5
    Kinder0177 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2011
    Posts
    3
    Perhaps I didnt explain properly but i've already tried that and it will work when i first try then it comes up with the debug error.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What debug error?

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

Similar Threads

  1. Replies: 11
    Last Post: 07-24-2012, 07:50 PM
  2. ComboBox Search - No Results
    By cvansickle in forum Forms
    Replies: 5
    Last Post: 03-27-2011, 03:37 PM
  3. Replies: 9
    Last Post: 01-20-2011, 02:22 PM
  4. save last record in table through a form
    By ajetrumpet in forum Forms
    Replies: 3
    Last Post: 09-09-2010, 08:53 AM
  5. Replies: 0
    Last Post: 02-24-2010, 12:56 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