I removed the option group and replaced with the following code:
If DCount("strLastName", "tbltest", "strLastName like 'C*'") > 0 Then
Me.Filter = "strLastName like 'C*'"
Me.FilterOn = True
Else
MsgBox "No records exist"
End If
End Sub
The code works...
The form I've build contains an option group with vb code to filter through the last name records for end user ease. The code to filter works, however when searching and viewing the data the last name field on some of my data changes to numerics.
See code below:
Private Sub...
If I'm reading your post correctly this should help?
If you just want to view your data in order you can click on the sort ascending icon on the toolbar. The icon has the letters A & Z with an arrow pointing down. Hope this helps.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.