Command button - add entry - getting error.

G

Guest

I get the error: can't go to specified record.

I am using the form to enter production numbers.

This is the code created when I used the command button wizard:

Private Sub Command32_add_entry_Click()
On Error GoTo Err_Command32_add_entry_Click


DoCmd.GoToRecord , , acNewRec

Exit_Command32_add_entry_Click:
Exit Sub

Err_Command32_add_entry_Click:
MsgBox Err.Description
Resume Exit_Command32_add_entry_Click

End Sub

-- Thanks!!
Bonni
 
M

missinglinq via AccessMonster.com

The first thing that comes to mind is that the form's Allow Additions is set
to NO. Go to the form's Properties Box, click on the Data tab and set it to
YES. IF you want users to be able to edit or delete records, make sure
AllowEdits and AllowDeletions are set to YES also. There are other ways (in
code) that the form could be set to not allow additions, but, assuming thisis
your db abd not inherited from someone else, you'd know if you'd coded this.
 
G

Guest

Thanks I'll try that.

Unfortunatly this is part my db and part inherited. The original author was
a programmer and wrote quite a bit of VB into the db. This form is all me
so it is pretty basic.
 

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