I have a combo box that I am using to select a CustomerID from a table called Customers. Once a value has been selected I would like to update the RecordSource property of a sub form called order_entry_frm so that it will filter Order records for that customer. I tried the following...
-
Private Sub cboCustomer_Change()
-
strSQL = "SELECT OrderID, OrderDate, RequiredByDate, DatePaid " & _
-
" FROM Orders_tbl " & _
-
" WHERE CustomerID=" & Me!cboCustomer.Value & ";"
-
Me!order_entry_frm.RecordSource = strSQL
-
Me!order_entry_frm.Requery
-
End Sub
-
...but got a compiler debug message pointing at line " Me!order_entry_frm.RecordSource = strSQL" which said "Run-time error 438. Object does not support this property or method".
Is there another/better way of doing what I want?
TIA,
Nick.