accesskiddo
New member
- Local time
- Today, 08:53
- Joined
- May 3, 2021
- Messages
- 6
It seems like I am missing something in one of these codelings.
I get different errors depending on what I change in the Where section.
1.
Private Sub ClientID_AfterUpdate()
Dim SQL As String
SQL = "Select ClientID From ClientT Where ClientID=" & Me.[cboClientID]
Me.ProductReceiveSF.Form.RecordSource = SQL
Me.ProductReceiveSF.Form.Requery
End Sub
2.
Private Sub cboClientID_AfterUpdate()
Me![ProductReceiveSF]![cboProduct].RowSource = "SELECT ProductNAme, ClientCode, ProductCode, ClientName FROM ClientT INNER JOIN [ProductT].[ProductClientID]=[ClientT].[ClientID] WHERE ClientID=" & Me!cboProduct
Me![ProductReceiveSF]![cboProduct].Requery
End Sub
I have a main form and subform scenario and there are more than 5 tables involved. I am trying to filter the list of Products displayed in the subform based on the ClientID in the mainform. Right now its shows all Products from All Clients.
I get different errors depending on what I change in the Where section.
1.
Private Sub ClientID_AfterUpdate()
Dim SQL As String
SQL = "Select ClientID From ClientT Where ClientID=" & Me.[cboClientID]
Me.ProductReceiveSF.Form.RecordSource = SQL
Me.ProductReceiveSF.Form.Requery
End Sub
2.
Private Sub cboClientID_AfterUpdate()
Me![ProductReceiveSF]![cboProduct].RowSource = "SELECT ProductNAme, ClientCode, ProductCode, ClientName FROM ClientT INNER JOIN [ProductT].[ProductClientID]=[ClientT].[ClientID] WHERE ClientID=" & Me!cboProduct
Me![ProductReceiveSF]![cboProduct].Requery
End Sub
I have a main form and subform scenario and there are more than 5 tables involved. I am trying to filter the list of Products displayed in the subform based on the ClientID in the mainform. Right now its shows all Products from All Clients.