okay heres my code:
Private Sub Form_Load()
DoCmd.GoToRecord , , acNewRec
If IsFormOpen("associate/project") = True Then
DoCmd.ApplyFilter , "LastName = Forms![Associate/Project]![txtlast]"
End If
On Error GoTo Err_Form_Load
DoCmd.ApplyFilter , "LastName = Forms![Associate/Project]![txtlast]"
DoCmd.Restore
Exit_Form_Load:
Exit Sub
Err_Form_Load:
MsgBox Err.Description
Resume Exit_Form_Load
End Sub
okay what I want to accomplish is this on load if the function returns true then it runs the filter, if it returns false it should do one of two things not run the filter or remove filters from that form. the last part ahs got me stuck.
any help would be appreciated thank you,
Rpb
Private Sub Form_Load()
DoCmd.GoToRecord , , acNewRec
If IsFormOpen("associate/project") = True Then
DoCmd.ApplyFilter , "LastName = Forms![Associate/Project]![txtlast]"
End If
On Error GoTo Err_Form_Load
DoCmd.ApplyFilter , "LastName = Forms![Associate/Project]![txtlast]"
DoCmd.Restore
Exit_Form_Load:
Exit Sub
Err_Form_Load:
MsgBox Err.Description
Resume Exit_Form_Load
End Sub
okay what I want to accomplish is this on load if the function returns true then it runs the filter, if it returns false it should do one of two things not run the filter or remove filters from that form. the last part ahs got me stuck.
any help would be appreciated thank you,
Rpb