Results 1 to 4 of 4
  1. #1
    Brian62 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2009
    Posts
    147

    Populate text boxes with a command button

    I want to populate two text fields from a combobox with a command button to enter into text boxes in my form.
    The combobox is getting it's info from tblcommitteeinfoentry. The two fields are PI and RDOfficeStudyNo.
    The form name is Frmconsenterror and to populate the table called consenterrors with fields named PI and studyno.

    Thanks for the help!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    The form has consenterrors as its RecordSource? Try:

    Me!PI = Me.comboboxname.Column(0)
    Me!studyno = Me.comboboxname.Column(1)
    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.

  3. #3
    Brian62 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2009
    Posts
    147
    How do I incorporate the command button to enter the data from the combobox to the text boxes? Thanks!

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Put the code into the command button Click event. Or use the AfterUpdate event of the combobox and no button needed.

    I use VBA only, no macros.
    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: 3
    Last Post: 10-01-2011, 02:21 PM
  2. Replies: 1
    Last Post: 09-20-2011, 05:57 AM
  3. Replies: 11
    Last Post: 06-02-2011, 10:21 AM
  4. Replies: 0
    Last Post: 12-02-2010, 11:59 AM
  5. Replies: 3
    Last Post: 05-25-2010, 02:16 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