"Cannot go to specified Record"

G

Guest

I am relatively new to database design so forgive me for my ignorance.

I have developed a new database for data entry in my department. I keep
having the problem where the users will receive the error "Cannot go to
specified record" when they are trying to click the Submit command button on
the data entry form. The database will be working fine but all of the sudden
this error will start to occur with several users.

The command button has the following code:
Private Sub Submit_Click()
On Error GoTo Err_Submit_Click
DoCmd.GoToRecord , , acNewRec

Additional information:
At peak times the form has about 50 - 75 users.
Security was set for each user through the security wizard
The database is not split

Do I have too many users at one time or do I need a different code for the
command button? I keep seeing references to me.dirty code but I don't
understand what that code does.

Thanks for your help.
 
G

Guest

What are you expecting the Submit button to do? The code is trying to create
a new record. It could be your existing record is not complete or, because
of the number of users, there is a locking problems.

With that many users, it is insane not to spilt the database. You should
split it and install a copy of the front end on each user's machine.
 
G

Guest

When I want to have a form that creates a new record, rather than a "submit"
I have a "save" button. I have the form open as Data Entry.

The button:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 '
Save Record
DoCmd.Close ' Close Form - this could be replaced with your
' DoCmd.GoToRecord , , acNewRec ' If you want to have them enter more
than one record at a time

The form:
Edt>Select Form
Properties panel>Data tab>Data Entry = Yes
This means that, when you open the form, rather than loading all the records
and displaying one, it will open with a blank form for the user to fill in a
new record. It will not actually create a new record unless the user starts
to fill in the form. I create a handy "Cancel" yes/no field, in case they
make the mistake of starting to fill something in and then decide against it.
I then just exclude all the cancelled items from the queries.
 

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