Coded command button only works for some users

  • Thread starter Thread starter Erin
  • Start date Start date
E

Erin

I have created an entry form with a command button with the following code
attached. For some users of the database this button works but for others it
doesnt. For the users it doesnt work for the button does not do anything when
clicked. Any ideas would be greatly appreciated. Could it be security
settings?

Private Sub cmdAddnew_Click()
On Error GoTo Err_cmdAddnew_Click


DoCmd.GoToRecord , , acNewRec
Me!ProjectID = DMax("[ProjectID]", "[MainTracking]") + 1
Me.Project_Pre2007 = Me.ProjectID
Me.LinkToReport = "E:\Library\Reports\" & [Project#Pre2007] & ".pdf"
Me.DateEntered = Date


Exit_cmdAddnew_Click:
Exit Sub

Err_cmdAddnew_Click:
MsgBox Err.Description
Resume Exit_cmdAddnew_Click

End Sub
 
Back
Top