Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2004
    Location
    Inverurie
    Posts
    628

    Unanswered: copying text value from a combo box and save it on a table

    Can anyone suggest a method of copying a value of a combo box choice to a specific field in a table?

    For example:

    The combo box looks up a list from a table called employees.

    Once a user logs in, he or she will have selected their name in the combo box and typed in their password. Once they click on the login button and it verifies the login as correct, i want access to copy the name from the combo box (or the table), and paste it into the Username field of Record 1 on the Config table.

    I really hope someone can help with this.

    Cheers

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    You can access objects on a form with the syntax:

    forms!yourForm!yourObject

    Use this in a query to pull the currently displayed information.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Jul 2004
    Location
    Inverurie
    Posts
    628
    and i can save it to the target table from there?

    This is bearing in mind that the login form will close after it's copied the required data.

  4. #4
    Join Date
    Jul 2004
    Location
    Inverurie
    Posts
    628
    Would it be possible to use an update command to update the Config table to match the combobox value using VBA?

  5. #5
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Quote Originally Posted by cruickshanks
    Would it be possible to use an update command to update the Config table to match the combobox value using VBA?
    Absolutely. Same syntax.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •