Results 1 to 1 of 1
  1. #1
    mnaem02 is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    24

    Subform field criteria based on the main form combobox

    Hi If I select in main form supplier in combobox than products related to that supplier only be shown in subform.




    this code i am using to put criteria in subform product combox but its not working

    Private Sub SName_AfterUpdate()
    Dim strsource As String


    strsource = "SELECT Product " & _
    "FROM Supplier " & _
    "WHERE SupplierName = '" & Me.SName & "'"



    Me.Order_Detail_subform1.Form!Product.RowSource = strsource


    Me.Order_Detail_subform1.Form!Product = vbNullString


    End Sub
    Attached Files Attached Files

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

Similar Threads

  1. Replies: 1
    Last Post: 09-06-2011, 01:47 PM
  2. Replies: 29
    Last Post: 08-16-2011, 05:52 PM
  3. Subform Combobox based on Main form combo box
    By accessmom in forum Forms
    Replies: 5
    Last Post: 02-21-2011, 07:02 AM
  4. Replies: 1
    Last Post: 11-16-2010, 08:42 AM
  5. Replies: 0
    Last Post: 08-24-2010, 06:38 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