unable to goto new record

M

martha.dempsey

I am using access 2000 and I had something similar that
dealt with indexes. If you access your table and click on
to the index icon (looks like a lighting bolt) and there
are more than 32 fields listed for your table then it will
not let you save or have the option to select a new record
(asterisk on navigator disappears). You can delete some
of the indexes without deleting your fields.

Try it on a copy first to see if that is what you need.
martha
-----Original Message-----
Hello,
i have a subform which has a command button on it that fires the action:
docmd.goto , , acnewrec
This subform has also an error trapper in the form error event
Me.controls(subform_name).form.recordset.addnew

If i insert a record with duplicate values for the
primary keys the form error event happens ONLY if i use
the command button on the main form.
If i act on the command button on the subform a msg just
says that "You can't go to the specified record".
For what i can see the form error event doesn't happen
(so my error trappers fail...) acting on the command
button on the subform. Why?
 
G

Guest

Thanks for you rreply but i dont' think is an "index thing"
I can add new records without any problems
I have a mani form which has a subform. I use the subform to enter data. On the main form there is a command button named "SAVE" which us
me.controls(subformname).form.recordset.addne
To go to a new record. The subform itself has a command button named "ADD" which does almost the same thing, but us
docmd.goto,,newrec
Both works fine when I add new records, but... let's say i insert duplicated values for the primary key's fields..
When i use the command button "SAVE" on the main form the form error event is fired for the form relying the subform. If i use the command button "ADD" in the subform, the form error event doesn't fired. In the form error event i have code which manage the error 3022 for duplicated values of primary key which gives me option to cancel/retry operation (changing values in controls). The command button "ADD" also has an error handler, not specific for the case of error 3022 because i guess it was handled by the form erro event. I dont' receive the msg from the error event routine but from the add_click routine (which is generic and doesn't explain what's the matter)
Hope this is more clear, i'm italian and not so good with english
Thanks anywa
Nico
 

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