Thank you for your reply.
Here is the code that runs when the user clicks the button to open the form. From what I can understand, the code runs after the form opens.
Code:
Private Sub perform_filter_Click()
On Error GoTo Err_changepart_Click
Dim DocName As String, LinkCriteria As String
DocName = "frm_filter_part"
DoCmd.OpenForm DocName, , , , acFormEdit
DoCmd.RunCommand acCmdFilterByForm
Exit_changepart_Click:
Exit Sub
Err_changepart_Click:
MsgBox Err.Description
Resume Exit_changepart_Click
End Sub
Thank you again for your help.