In my form I have a sub/form which is based off a query just showing a few fields from the customers table. I can type a filter into my main form which affects the subform using the VBA code:
Private Sub cmdFilter_Enter()
Me.frmCustomerListing.Form.Filter = "tblCustomers.Firstname LIKE '*" & txtFirstName.Value & "*'"
Me.frmCustomerListing.Form.FilterOn = True
End Sub
Firstly, this only works if I do:
"tblCustomers.Firstname LIKE '*" & txtFirstName.Value & "*'"
and not:
"tblCustomers.Firstname LIKE '%" & txtFirstName.Value & "%'"
why would that be?
My second question is that the results shown are in datasheet mode. How could I get it so that when an entry is double clicked it brings up a form showing just that customer record? Or can I do it in a different way (datasheet looks ugly)? Thanks!
Private Sub cmdFilter_Enter()
Me.frmCustomerListing.Form.Filter = "tblCustomers.Firstname LIKE '*" & txtFirstName.Value & "*'"
Me.frmCustomerListing.Form.FilterOn = True
End Sub
Firstly, this only works if I do:
"tblCustomers.Firstname LIKE '*" & txtFirstName.Value & "*'"
and not:
"tblCustomers.Firstname LIKE '%" & txtFirstName.Value & "%'"
why would that be?
My second question is that the results shown are in datasheet mode. How could I get it so that when an entry is double clicked it brings up a form showing just that customer record? Or can I do it in a different way (datasheet looks ugly)? Thanks!