Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    eldarbs is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    17
    hey june7.. first - thanks again !!
    i tried some things and i succeeded to make the right filtering on those comboboxe by putting this code on the enter event and the exit event :

    Me.c_cmb.RowSource = "SELECT Products.ID, Products.[Product Name]FROM [Products Category]INNER JOIN Products ON [Products Category].[Product Category ID]= Products.[Product Category ID] WHERE ((([Products Category].[Product Category ID]) = [Forms]![Order Details singel].[combobox_name]))GROUP BY Products.ID, Products.[Product Name];"
    it's works fine on a singel form (and also Prevents from the other rows to change vereytime i fill a new row of bombobox in the singel conuinuius form)
    the problem is steel when i do the same on the order details subform - i get an error massage box from access that asking from me to insert the value
    instad of taking it from the first combobox like it doing well in the same thing on the single form.
    i think that i have a mistake in the referral to the subform in that code that i put on thae same way to the subfrom :

    Me.c_cmb.RowSource = "SELECT Products.ID, Products.[Product Name]FROM [Products Category]INNER JOIN Products ON [Products Category].[Product Category ID]= Products.[Product Category ID] WHERE ((([Products Category].[Product Category ID]) = [Form]![Order Details form]![Order Details subform].[combobox_name]))GROUP BY Products.ID, Products.[Product Name];"

    please chack the code if this is the way that i should referral RowSource query to a subform.


    thanks.

  2. #17
    eldarbs is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    17
    hey june7, thanks for all..
    i received a refernce from that links that solved my question :

    http://www.btabdevelopment.com/ts/refer2sfrms

    http://www.btabdevelopment.com/ts/ewtrhtrts

    the right way was not putting any queries on the RowSource - also to Prevents from the other rows to change vereytime i fill a new row of bombobox in the singel conuinuius form. and Instead of, just put that code on enter and the exit event of the second CMB and just on the enter event of the last CMB :

    Me.Product_ID.RowSource = "SELECT Products.ID, Products.[Product Name]FROM
    [Products Category]INNER JOIN Products ON [Products Category].[Product Category
    ID]= Products.[Product Category ID] WHERE ((([Products Category].[Product
    Category ID]) = Forms![Order Details]![sbfOrderDetails].Form![combobox name]))GROUP BY Products.ID,
    Products.[Product Name];"

    solved !!

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 09-07-2012, 10:48 AM
  2. Replies: 1
    Last Post: 06-25-2012, 02:15 PM
  3. Replies: 0
    Last Post: 08-24-2010, 06:38 PM
  4. Replies: 1
    Last Post: 07-30-2010, 10:28 AM
  5. How to make A combobox run a query?
    By UnrealEnvy in forum Access
    Replies: 8
    Last Post: 08-17-2009, 11:28 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