S
Sandy H
Hi
I am trying to use the following code to filter a query but not having much
luck. Can anyone tell me what I'm doing wrong.
Function getJRegion() As String
strJRegion = Forms!frmReportsMenu!txtRegion
If strJRegion = "(ALL)" Then
getJRegion = "'*'"
Else
getJRegion = strJRegion
End If
End Function
I call getJRegion from a query. If the user wants to query one Region then
there will be a filter but if they want to query all regions there will be
no filter.
Thanks in advance
Sandy
I am trying to use the following code to filter a query but not having much
luck. Can anyone tell me what I'm doing wrong.
Function getJRegion() As String
strJRegion = Forms!frmReportsMenu!txtRegion
If strJRegion = "(ALL)" Then
getJRegion = "'*'"
Else
getJRegion = strJRegion
End If
End Function
I call getJRegion from a query. If the user wants to query one Region then
there will be a filter but if they want to query all regions there will be
no filter.
Thanks in advance
Sandy