I'm new to access and vba but been tasked with creating an asset register database at work..i have created a db with a single table with a form and subform the subform is laid out as a datasheet and the main form has a series of boxes detailing the full details of each asset..
i have created 15 combo boxes that each act as a individual filter on the datasheet, but i need to get them to work along side any number of the other 14 combo boxes to filter the assets further.. (i know 15 filters is a lot but trust me its needed...)
the code i have used for the combo boxes is as below but "cbostore" changing to identify each box..
Please can someone let me know where im going wrong..
Regards and many thanks for you time and help..
KeeF
i have created 15 combo boxes that each act as a individual filter on the datasheet, but i need to get them to work along side any number of the other 14 combo boxes to filter the assets further.. (i know 15 filters is a lot but trust me its needed...)
the code i have used for the combo boxes is as below but "cbostore" changing to identify each box..
Please can someone let me know where im going wrong..
Regards and many thanks for you time and help..
KeeF
Code:
Private Sub cboStore_AfterUpdate()
Dim strSQL As String
strSQL = " SELECT * FROM AssetLog "
strSQL = strSQL & " WHERE AssetLog.BranchNUMBER = '" & cboStore & "';"
Me!AssetSF.LinkChildFields = "BRANCHNUMBER"
Me!AssetSF.LinkMasterFields = "BRANCHNUMBER" Me.RecordSource = strSQL
Me.Requery
End Sub