Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command Button failure

Status
Not open for further replies.

scottshiv

MIS
Sep 13, 2002
47
US
Our database has five users. The main form they use is a data entry form that has a name search function. The search function is called by pressing the name search command button. The command button applies a filter and opens the data entry form. The query brings up a text box to enter the name. There is no security set for the users so that is not the problem. If the user has rights to the directory, they have rights to the database.

The system is working for four of the five users. Whenever Jane tries to use the search function, it works once or twice and then stops(the text box fails to display). I have tried good names, bad names, no names and I can't duplicate her results and none of the other users can either. However, it happens to her every time she opens the form. What could be causing the failure just for her. Sys support has changed out her computer twice and it still craters every time she enters the form.

What causes a command button to fail like that? There is no if Jane fail clause anywhere.

Here is the On Click code:

Dim errormsg As String

On Error GoTo Errorhandler

DoCmd.ApplyFilter "Name Search"

DoCmd.OpenForm "PA request"

Forms![PA request]![Medicaid#].SetFocus

Exit Sub

Errorhandler:

errormsg = "Previous Action Cancelled"

MsgBox errormsg, vbExclamation

DoCmd.ShowAllRecords

Resume Next

End Sub
 
Scott,

Have you checked the references in VBA to see if she is missing something? Maybe MDAC version is not up to date.

Stix 42
Long Live Rock and Roll
Pop is for drinking
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top