+ Reply to Thread
Results 1 to 5 of 5

Populating a userform based on a combobox selection

  1. #1
    Registered User
    Join Date
    07-08-2010
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2007
    Posts
    24

    Populating a userform based on a combobox selection

    I am new to using VBA, and this is the first userform I have ever made. I'm trying to build a database of a lot of data (as many as 10,000 rows of data) for a clinical research trial.

    I've developed a userform with a multipage control that has two tabs. However, the data on each of these tabs is to be entered at different times, so what I would like to do is set the comboboxes at the top of the second tab ("Image Interpretation") so that the correct patient can be identified and the data entered into the correct row. I have thought of two possible ways to do this, but I am not sure about how to go about doing either of these, or which would be the best way to go.

    The first solution I thought of was to have the data on the first tab of the multipage control ("Patient Data") save to a separate worksheet, and to then program the userform so that it would automatically fill in the data for the patient (once it was identified using the comboboxes at the top of the second tab), so that it could be entered into a master worksheet with the data from the second tab.

    My other idea was to program the "OK" command button on the second tab to automatically enter the data for the patient selected into the correct row.

    I've attached a copy of what I have so far, in case that helps.

    I already started a thread with a similar question, but I wasn't sure how to adapt the code that the users provided to fit my needs. I'm not sure how to link that thread to this one, but the title of the thread was "adding values to a combobox from a specific range of cells".

    I really appreciate any help you all can give me!
    Attached Files Attached Files
    Last edited by blindzero678; 07-21-2010 at 11:20 AM.

  2. #2
    Registered User
    Join Date
    07-08-2010
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Populating a userform based on a combobox selection

    Any help at all would be greatly appreciated, even if it's just to point me in the right direction of where to look.

  3. #3
    Registered User
    Join Date
    07-08-2010
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Populating a userform based on a combobox selection

    any suggestions at all??

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,202

    Re: Populating a userform based on a combobox selection

    Please don't start a new thread on the same subject

    I don't think you are explaining what you want properly. Which Combobox & what do you want to populate?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Registered User
    Join Date
    07-08-2010
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Populating a userform based on a combobox selection

    My apologies. I hope this clears things up.

    So all of the controls on the Patient Data tab are entered at once. The controls on the Image Interpretation tab are to be entered at a different time, however. What I would like to be able to do is use the controls Combobox_Period, Combobox_StudyDate, and Combobox_Name to search through all the data that has been entered into the database, and to populate the userform with all the data for the corresponding patient, so that the data on the Image Interpretation tab can be entered into the same row as the data from the Patient Data tab.

    any suggestions or guidance at all would be greatly appreciated. Thank you!!
    Last edited by blindzero678; 07-22-2010 at 06:42 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1