Results 1 to 15 of 15
  1. #1
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480

    Talking Combo Boxes, Selections, frustrations

    Alright, So I have a small app. Then end goal is to do something that performs similar to the search on the kelly blue book site.

    http://www.kbb.com/car-values/

    I have created a table that holds all the car makes (tblmake) and this is linked to a combobox on the form.


    Problems I am having..

    1. Despite being able to see the selection of car makes in the combo box.. nothing happens when I click on it. The drop down remains open and nothing is selected.

    2. After the above problem is solved. I will want the 2nd combobox to offer a drop down of the car models... So if the person chooses Chevrolet in the first dropdown box, the second will only display models for that make.


    ....

    Any suggestions to my first problem? Any suggestions for database / Form design? I am super new to combo boxes, figured this was a good way to learn about them.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    1 sounds like the form or control is locked, or the record source is read only. This should help with 2:

    Baldy-Cascading Combos
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Hard to say without more info or seeing your mdb.

    You are trying to set up cascading combo boxes. Maybe this will help you. Attached is a mdb with a 7 combo box cascade - one form uses combo boxes and the other uses list boxes. I used the list boxes to see what I was doing, but it takes up a LOT of real estate!!

    If you can't get it solved, do a "compact and repair" on your mdb, Zip it, then upload it.

  4. #4
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    Hmm, well the combobox itself is not locked. and the Record source is a table within the same database, and I am not sure where to check if it is read only. I right clicked and checked properties but nothing is marked read only... If I sound like a noob, its because I am.

  5. #5
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    Quote Originally Posted by ssanfu View Post
    Hard to say without more info or seeing your mdb.

    You are trying to set up cascading combo boxes. Maybe this will help you. Attached is a mdb with a 7 combo box cascade - one form uses combo boxes and the other uses list boxes. I used the list boxes to see what I was doing, but it takes up a LOT of real estate!!

    If you can't get it solved, do a "compact and repair" on your mdb, Zip it, then upload it.
    Hmm not seeing the attachment.

  6. #6
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    Alright here is a copy of what I have so far, Please ignore the obviously irrelevant code. I am just reshaping an old app. Unrelated.zip

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You can't make selections because of the control source of the combo.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    I tried changing it a bit but can't get it working.

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I deleted it and was able to select any option.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  10. #10
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    Wow you're right... Well... thank you for everyone's time. And with that being done, your example from your site is how I plan to move forward!

  11. #11
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    No problem. It can have a field as the control source if you wanted to save it, but not a formula.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  12. #12
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    Hmm, this is a little bit off topic... but Could ( on your example ) be replace cbostate with a label?

    I am trying to do this...

    SELECT [tblTest].[Problem] FROM tblTest
    WHERE ((([tblTest].[Atype])=[Forms]![frmMainnew]![lblAtype]))
    ORDER BY [tblTest].[Problem];

    Or to keep it in your example...

    Code:
    SELECT [Cities].[City] FROM Cities 
    WHERE ((([Cities].[State])=[Forms]![CascadingComboSample]![cboState1])) 
    ORDER BY [Cities].[City];
    
    I want to do this
    
    SELECT [Cities].[City] FROM Cities 
    WHERE ((([Cities].[State])=[Forms]![CascadingComboSample]![lblState1])) 
    ORDER BY [Cities].[City];

    The Label value or caption is dependent on a webpage variable.. for example, currently lblAtype is set to "laser printer"

    Then in the tbltest I have 2 columns. One with Atype and another with Problem.
    Under Atype, I have "laser printer" and then in the other column I have a list of problems for that Atype. All of this is on a form named "frmMainnew"..

  13. #13
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Could be, but I've never tried. You'd have to refer to the Caption property of the label, as it has no Value property, which is the default when unspecified. Try

    [Forms]![CascadingComboSample]![lblState1].Caption
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  14. #14
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    YES!! Small moment of victory here... I tried this before your answer and both failed..

    [caption.lblState1]
    [lblState1.caption]
    ["lblState1"]

    So I was on the right path... just wrong placement! Thank you again very much...

  15. #15
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 9
    Last Post: 07-31-2012, 11:30 AM
  2. Replies: 2
    Last Post: 06-19-2012, 08:30 AM
  3. Replies: 3
    Last Post: 04-09-2012, 10:16 AM
  4. Replies: 6
    Last Post: 12-20-2010, 04:17 PM
  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