Results 1 to 5 of 5
  1. #1
    gesouthward is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2016
    Posts
    2

    Form to display other table fields associated with combo box then store those values...

    Hi,



    I also posted this in the excelforum.com. Hope that is OK.

    I have done multiple searches to try and figure out how to do what I am needing done. I don't think I know enough to ask the right questions.

    Attached is a working sample of my database.

    In the "Rounding Log" form I need to three associated fields to be populated when an Employee's name is selected from a Combo Box.
    The Nickname, Department and Director fields.
    Then when the record is complete those fields then be stored in the applicable fields of the "Rounding Log" Table.

    I need to be able to do this in order to generate reports from the "Rounding Log" table that are applicable to Departments and Director information.

    Hope this make sense and someone can help me.

    Thanks,
    Attached Files Attached Files

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    If you are editing 1 record,
    the combo box has all info of the employee as many columns in the combo.
    in the AFTERUPDATE event of the combo, assign the fields,

    Code:
    sub cboBox_afterupdate()
    'note, in VB columns start with zero
    txtNick= cboBox.column(1)
    txtDept=cboBox.column(2)
    end sub

  3. #3
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    I am not able to open your database at this time, but here goes anyway.

    In the Row Source of your combobox include those three fields, set their column width to zero. Then in the OnClick (or AfterUpdate) event of the combobox set each of your three fields to me!comboboxname.column(?)

  4. #4
    gesouthward is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2016
    Posts
    2
    Ranman356 & aytee111,

    Thank you very much for the info. That got me going in the right direction.
    Now I need to get the data from those text boxes into another table.

    I have searched all over, but can't find an example that will work for me.

    Is this done with a VBA or some other command?

    Thanks,

  5. #5
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    An update query should be all you need. If it is immediate then you could run the query in the same event.

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

Similar Threads

  1. Replies: 1
    Last Post: 02-04-2015, 03:12 PM
  2. Replies: 5
    Last Post: 11-17-2013, 04:20 PM
  3. Replies: 3
    Last Post: 07-01-2013, 12:31 PM
  4. Hve text combo box values but store integers in field
    By accesshelpasker in forum Access
    Replies: 9
    Last Post: 10-28-2011, 10:49 AM
  5. How do I get dlookup values to store in table
    By rpmyhero in forum Access
    Replies: 1
    Last Post: 11-25-2009, 05:57 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