DoCmd Access 2007

G

GrahamJ

I've just changed from Access 2002 to Access 2007 and it seems that a number
of lines of code that use DoCmd just do nothing.

Despite a morning's searching, I haven't found a solution or explanation so
here is one issue.

There is a button on a data input form to open a new record - it's always
worked fine in Access 2002 but in 2007 the record does not change.

The code is
Private Sub cNewRec_Click()
On Error GoTo Err_cNewRec_Click

DoCmd.GoToRecord , , acNewRec

Exit_cNewRec_Click:
Exit Sub

Err_cNewRec_Click:
MsgBox Err.Description
Resume Exit_cNewRec_Click

End Sub
 
G

GrahamJ

Hi Gina

Thanks very much for your prompt reply - that fixed it.

I wonder what other "gotcha's" will surface from the conversion?

Thanks
 

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