Results 1 to 6 of 6
  1. #1
    Desstro's Avatar
    Desstro is offline Competent Performer
    Windows XP Access 2010 (version 14.0)
    Join Date
    May 2010
    Posts
    185

    1 combo box to control multiple areas on form

    Someone please help with this. I've been trying to figure this out for hours now.



    See image.

    What I want to do is add a combo box on my form under the heading "PKG#". The box will have values obviously from the "PackageNumber" from the table.

    Once a PKG# is selected from the combo box I would like there to be text boxes under the "Program", "Area", and "Location" headings on the form that auto populate the like data from the table according to what PKG# is selected.

    Is this possible?

  2. #2
    Desstro's Avatar
    Desstro is offline Competent Performer
    Windows XP Access 2010 (version 14.0)
    Join Date
    May 2010
    Posts
    185
    I think I might be on the right track.

    Instead of my previous question, try this one...

    I make one combo box that looks up all four values I'm looking for.

    Done.

    Now when I select something from the combo box how do I make it show all the data instead of just the PKG#?

  3. #3
    Desstro's Avatar
    Desstro is offline Competent Performer
    Windows XP Access 2010 (version 14.0)
    Join Date
    May 2010
    Posts
    185
    Ok so in a nut shell....

    as you can see from the combo box I have package 1 2 and 3.

    When I choose 1, the only data that shows up is the number one.

    What I want to happen is when I choose 1, all the data in the combo box associated with 1 shows up in the combo box.

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Your interface looks interesting. I'd actually like to take a look at your file. It would be kinda fun!

  5. #5
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Quote Originally Posted by Desstro View Post
    Ok so in a nut shell....

    When I choose 1, the only data that shows up is the number one.

    What I want to happen is when I choose 1, all the data in the combo box associated with 1 shows up in the combo box.

    A combo box only displays one column of the row source. In your example, it will display the Package number. To automatically fill in the unbound controls "Property", "Area" & "Location", the code would look something like:

    Code:
    Sub Combo16_AfterUpdate()
         Me.PropertyLoc = Empty
         Me.Area = Empty
         Me.Location = Empty
     
    'Combo box columns are Zero based.
    'First column is 0
    'Second column is 1
        Me.PropertyLoc = Me.Combo16.Column(1)
        Me.Area = Me.Combo16.Column(2)
        Me.Location = Me.Combo16.Column(3)
     
    End Sub
    Note that "Property" is a reserved word and shouldn't be used for object names. For a list of reserved words, see:

    http://allenbrowne.com/AppIssueBadWord.html


    HTH
    ----
    Steve
    --------------------------------
    "Veni, Vidi, Velcro"
    (I came; I saw; I stuck around.)

  6. #6
    Desstro's Avatar
    Desstro is offline Competent Performer
    Windows XP Access 2010 (version 14.0)
    Join Date
    May 2010
    Posts
    185
    Thanks ssanfu.

    However I got an answer for this in another post titled "ComboBox in this same forum.

    Appreciate ya though. Should have marked this thread solved. Will do that now.

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

Similar Threads

  1. Replies: 47
    Last Post: 06-17-2010, 03:04 PM
  2. Filter form from multiple combo boxes
    By Bird_FAT in forum Programming
    Replies: 6
    Last Post: 05-19-2010, 09:32 AM
  3. Multiple Control Box on Page
    By nkenney in forum Forms
    Replies: 2
    Last Post: 10-26-2009, 10:37 AM
  4. Multiple combo box
    By sparta363 in forum Forms
    Replies: 1
    Last Post: 06-22-2009, 02:03 PM
  5. Replies: 1
    Last Post: 03-02-2009, 11:54 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