Results 1 to 7 of 7
  1. #1
    PaulCW is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    15

    Cascading Comboboxes and Sub Forms

    I've got cascading comboboxes working on forms, but they refuse when in a sub form.
    Additionally, if I open up the subform itself, the cascading comboxes work fine. When I use it in the main form, it gives a syntax error:
    Enter Parameter Value
    forms!Info_Subform.cmbArea2
    Info_Subform is the subform's name and the combobox is cmbArea2...
    Ideas?
    Thanks in advance,


    Paul

  2. #2
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    The reference to the subform syntax is wrong. See this site:

    Refer to Form and Subform properties and controls

    http://access.mvps.org/access/forms/frm0031.htm

  3. #3
    PaulCW is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    15
    Thanks for the info. Will check it out. Still learning the lingo, but should be able to figure it out. If not, I'll be back.
    Again, thanks.
    Paul

  4. #4
    PaulCW is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    15
    Thanks, Steve, for the link. Unfortunately, I couldn't find the solution to my problem on it. Therefore, I've included my unfinished database that illustrates the now 2 problems I'm having with subforms.

    Problem 1: Combobox drawing from a query only gives a number. When I run it in the Query Builder, it displays correctly, but only gives a number in the form. I've tried changing column count and column widths on the format with no success. frmContact/Info_Subform/Quest-Select shows the problem.

    In contrast, Area_Select draws from a table and works correctly- but I would prefer to switch it as well to draw from the QAC query.

    Problem 2. Still can't get cascading comboboxes to work correctly. frmContact/Info_Subform/Cat-Select shows the problem. Category should be limited by the selection in Area. I've tried all sorts of combinations in the criteria box with no sucess. When I try to run it, it still pops an error box. For now, I've left it has a straight combobox.

    FWIW, on another database I was able to get cascading comboxes to work correctly on form with no subforms.

    Additional info:
    QAC: Question, Area, Category. It enables drilling down from general to specific. Question will have 3-5 records. Each question will then have 3-5 Area records each. Each Area could have 30+ records each. I built the Question and Area tables to facilitate building the QAC table.

    Thanks for any help you can render,
    Paul
    Last edited by PaulCW; 10-05-2011 at 05:14 PM.

  5. #5
    PaulCW is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    15
    Ideas, anyone, on either problem?
    Paul

  6. #6
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Unfortunately, I only have Access 2000, so I can't open the attachment. Maybe someone else will be able to help you solve the problems. Good luck..

  7. #7
    PaulCW is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    15
    Got both issues worked out.
    Regarding the numbers showing up, I'm still not sure how it all works, but by putting all the info for the comboboxes into one table with no external lookup or relations... tah dah.

    Re: the subform working right, it came down to again having all the data for the cascading comboboxes in the same table, no external lookups or relations with the Where Criteria being forms!Mainform!Subform!control Thought I had tried this before but might have used a "." instead of a "!" between the Subform and the control.

    Big thanks, Steve!

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

Similar Threads

  1. Comboboxes go where?
    By PaulCW in forum Database Design
    Replies: 12
    Last Post: 10-04-2011, 02:34 AM
  2. Replies: 7
    Last Post: 03-22-2011, 10:36 AM
  3. Split forms and filtered ComboBoxes
    By wakp in forum Forms
    Replies: 0
    Last Post: 12-01-2010, 11:10 AM
  4. Subform with Comboboxes
    By Angate in forum Forms
    Replies: 5
    Last Post: 04-23-2010, 08:10 PM
  5. cascading combo boxes on Continuous Forms
    By Jerry8989 in forum Forms
    Replies: 0
    Last Post: 10-12-2009, 10:02 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