Coded command button only works for some users

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top