jayclifford
Registered User.
- Local time
- Today, 01:26
- Joined
- Jul 23, 2013
- Messages
- 16
I want to use buttons on a form to change the sort order on a continuous form. In the buttons click event I am using a public function (named Sort_1) to change the sort order. The first element of the event call is the name of a generic query (named Sort_1_Query1) and the query field to sort (LAST_NAME OR FRIST_NAME, depending on the button.)
This is the Click Statement.
=Sort_1("Sort_1_Query1","LAST_NAME")
This is the Public Function
Public Function Sort_1(SortName As String, FieldName1 As String)
DoCmd.ApplyFilter SortName, FieldName1 & "between 'A' and 'Z'"
End Function
This does not work!
I think the problem is in the use of quotation marks or trying to pass the query field name to the Do Command or the use of an ampersand. HELP!
This is the Click Statement.
=Sort_1("Sort_1_Query1","LAST_NAME")
This is the Public Function
Public Function Sort_1(SortName As String, FieldName1 As String)
DoCmd.ApplyFilter SortName, FieldName1 & "between 'A' and 'Z'"
End Function
This does not work!
I think the problem is in the use of quotation marks or trying to pass the query field name to the Do Command or the use of an ampersand. HELP!