AccipiterQ
Programmer
I have a switchboard form in my database with several buttons on it. Each button opens the main form for the database and displays only a certain set of records...it's using a VBA filter. Now along the bottom of the main form is a set of alphabetical buttons, basically it's to show only those who have a last name of 'a, b, c' etc. you get the point. However when I hit the alphabetical button, it removes the filter that the switchboard form applies...is there any way around htis...so that the filter is still applied, and when the alphabet button is hit, you only see those with a last name that starts with say, 'A' within the filtered selection? The alphabet buttons are linked to a macro...and here's an example of the switchboard button's VBA:
Private Sub AFP_Button_Click()
On Error GoTo Err_AFP_Button_Click
Dim stDocName As String
stDocName = "Master List: Businesses"
DoCmd.OpenForm stDocName, , , "[From]='AFP'"
Exit_AFP_Button_Click:
Exit Sub
Err_AFP_Button_Click:
MsgBox Err.Description
Resume Exit_AFP_Button_Click
End Sub
the "[From]='AFP'" is what filters out the other records so that only entries with 'AFP' in the From field show up.
Private Sub AFP_Button_Click()
On Error GoTo Err_AFP_Button_Click
Dim stDocName As String
stDocName = "Master List: Businesses"
DoCmd.OpenForm stDocName, , , "[From]='AFP'"
Exit_AFP_Button_Click:
Exit Sub
Err_AFP_Button_Click:
MsgBox Err.Description
Resume Exit_AFP_Button_Click
End Sub
the "[From]='AFP'" is what filters out the other records so that only entries with 'AFP' in the From field show up.