Results 1 to 5 of 5
  1. #1
    shaunacol is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Sep 2012
    Posts
    55

    Combo box based on query not updating

    I have another tricky issue....I have a combo box called TicketType whose row source is linked to Qry_Pricetype and allows the combo box to list the type of tickets available for that attraction (i.e. adult, child, family). There are many different types of ticket for each attraction and they are all different (so i cannot consider a full list of all types as its too confusing). Qry_Price lists the TicketType from tbl_prices and is also linked to tbl_attraction to bring in the unique ID of that attraction (SKU).



    The query then has a criteria under SKU pointing to the form where my combo box is ([forms]![Frm_OrderClient]![Frm_OrderSub]![Frm_OrderDetailSub]![SKU]). This works well for the first entry. Then it seems to get confused and if I enter another record/attraction the combo box values in the drop down remain the same as the first attraction (even though I know they are not). I have tried a requery behind the combo and also in the AfterUpdate of the SKU. I have also tried requiring the query itself but I can not resolve this. Is it because I am entering multiple records that is gets confused? Funnily if I run the query separately when I have the form open and placed inside particular record then it work just fine.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    If you want to provide db for analysis, follow instructions at bottom of my post.

    Normally, cascading comboboxes are on the same form.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    shaunacol is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Sep 2012
    Posts
    55
    Thank you so much I really appreciate this. I have had to delete a lot of things to make it small enough but everything you need is there. I have made the form you need to look at the opening form. You must enter something in the STATUS field first and then you can enter the SKUs below that. I have left 2 of them in the dbase for examples (X012 and X028) these 2 have very different ticket types so you can easily see how it isn't working. You have to tab across and the data automatically gets filled out. Any help is appreciated, I am so close to finishing and have been stuck on this for ages.
    Attached Files Attached Files

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    I would not use dynamic parameterized query (I NEVER use them for anything) as combobox RowSource. I would use SQL statement:
    SELECT Tbl_price.[Type of ticket], Tbl_Attraction.SKU
    FROM Tbl_Attraction INNER JOIN Tbl_price ON Tbl_Attraction.[SKU] = Tbl_price.[SKU]
    WHERE Tbl_Attraction.SKU=[AttractionID];

    I also don't use macros so VBA would be:

    Private Sub AttractionID_AfterUpdate()
    Me.TypeOfTicket.Requery
    End Sub
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    shaunacol is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Sep 2012
    Posts
    55
    OMG it works!! You are a genius!!

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

Similar Threads

  1. Replies: 4
    Last Post: 08-09-2014, 02:33 PM
  2. Replies: 3
    Last Post: 06-18-2014, 10:40 AM
  3. Replies: 4
    Last Post: 06-09-2014, 10:34 AM
  4. Query isnt updating table based on criteria
    By shabbaranks in forum Queries
    Replies: 12
    Last Post: 01-10-2012, 11:51 AM
  5. Updating subform based on combo box change
    By kev921hs in forum Forms
    Replies: 3
    Last Post: 04-01-2010, 08:43 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