I have a combo box (cboPurchaseID) in the main form that a user can select to display detailed line items for the Purchase ID selected in the main form. The subform name is:sbfPurchasesDetailsSubFormView.
I have the following code for combo box afterupdate:
Private Sub cboPurchaseID_AfterUpdate()
strSQL = "SELECT tblPurchasesDetails.* FROM tblPurchasesDetails WHERE"
strSQL = strSQL & " (((tblPurchasesDetails.PurchaseID)=" & Me![cboPurchaseID] & "))"
Me!sbfPurchasesDetailsSubFormView.Form.RecordSourc e = strSQL
Me.sbfPurchasesDetailsSubFormView.Requery
End sub
IT IS NOT WORKING, PLEASE HELP!