MS Access: Order of Events in event ApplyFilter (ADP Project)
- by Jose Valdes
I'm having problems with the execution of ServerFilterByForm in Access 2003
When I apply the entered filter it returns the requested data but after it appear on screen (Form) it disappears. Don't know why this is happening
Does anyone had the same problem? How can it be solved?
Heris is part of the code
Private Sub Form_ApplyFilter(Cancel As Integer, ApplyType As Integer)
Dim stSql As String
If Len(ServerFilter) > 0 Then
stSql = "SELECT * FROM v_InitialReviewQuery " & _
" WHERE " + ServerFilter & _
" ORDER BY acctnumber"
Else
stSql = "SELECT top 1 * FROM v_InitialReviewQuery ORDER BY acctnumber"
End If
Me.RecordSource = stSql
End Sub