Results 1 to 8 of 8
  1. #1
    ashu.doc is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2012
    Posts
    124

    cascading combobox

    Hi
    I am cascading comboboxes in a form which is actually a subform (B) in main form (A), when I am using the query

    [forms]![B]![combobox]

    its not working, do I have to make a query something like :



    [forms]![A]![subforms]![B]![combobox]

    I have tried this as well, but still cascading is not working.
    Any suggestions?

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Can you describe exactly what you have? 2 combos on a subform?

    What are the the row sources of the combos?

    Have you seen the tutorials
    http://www.datapigtechnologies.com/f...combobox1.html
    http://www.datapigtechnologies.com/f...combobox2.html

    form/subform syntax see http://access.mvps.org/access/forms/frm0031.htm

  3. #3
    ashu.doc is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2012
    Posts
    124
    Ok so I have a Main form called F_Alldetails in which there is a subform F_Patientdetails and there is a subform in patient details called F_SurgicalDetails. So in F_SurgicalDetails I have included 2 combo boxes one is called Speciality and other is Operations. There are few specialities and in each specialities there are many operations.
    the row source for combo boxes is a table called Operations in which there are three fields - index, speciality and operations
    Something is wrong in my syntax, I am using in the query :
    [Forms]![F_Alldetails]![F_Patientdetails].[Form]![F_SurgicalDetails].[cmbspeciality]

    not working in the main form, but when I am using subform F_SurgicalDetails separately :

    [Forms]![F_SurgicalDetails].[cmbspeciality]

    working fine

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Did you look at the link
    form/subform syntax see http://access.mvps.org/access/forms/frm0031.htm
    and try a few things?
    Can you post a dumbed down copy of your mdb - remove confidential/personal stuff? Just enough records to show the issue with the forms/combos?

  5. #5
    ashu.doc is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2012
    Posts
    124
    Hi
    I have tried from that site but as I said its not working, I am sending the database. If you can please look into F_Alldetails, there is a subform F_Patientdetails and subform to F_Patientdetails is F_SurgicalDetails. I have combo 18 & 20 in that form which I want to work on.

    db1.zip

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Try changing the RowSource of cmboperation to

    SELECT Operations.Operations FROM Operations WHERE (((Operations.Speciality)=[Forms]![F_Alldetails]![Patient details].[Form]![General Surgery].[Form]![cmbspeciality])) GROUP BY Operations.Operations;

  7. #7
    ashu.doc is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2012
    Posts
    124
    Quote Originally Posted by orange View Post
    Try changing the RowSource of cmboperation to

    SELECT Operations.Operations FROM Operations WHERE (((Operations.Speciality)=[Forms]![F_Alldetails]![Patient details].[Form]![General Surgery].[Form]![cmbspeciality])) GROUP BY Operations.Operations;
    Great!! I think that is why people call you champ.

  8. #8
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

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

Similar Threads

  1. Replies: 4
    Last Post: 08-06-2012, 07:05 PM
  2. Replies: 1
    Last Post: 06-25-2012, 02:15 PM
  3. Cascading ComboBox Question
    By Kevo in forum Forms
    Replies: 14
    Last Post: 07-27-2011, 08:48 AM
  4. Autofill Text Box from Cascading Combobox
    By desibabu90 in forum Forms
    Replies: 14
    Last Post: 06-28-2011, 11:31 AM
  5. cascading combobox and validation rule violation
    By AndycompanyZ in forum Forms
    Replies: 7
    Last Post: 06-22-2011, 12:13 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