DoCmd.GoToRecord Question

R

Robert Nusz @ DPS

I have a problem adding New Records to its appropriate table via Form/Subform
usage. My parent form Fr_CR_U edits/updates table TST_FR_CASE_RECORDS. My
subform (sbFr_Add_Case_Others) to allow view, edit & updates to table
TST_FR_CASE_OTHERS. User is prompted for identifying record to be
viewed/updated, and query is performed, record located, and the forms above
displays the appropriate records. Allows scrolling (forward and backward)
through all records associated to main table selected record.

Problem lies when I click on command button to add new record, same form(s)
reflect clear subform for adding additional secondary record as needed. It
accepts data input to this form ok, but when you attempt to save the new
added record, (in any form or fashion of save function) it fails with message
of

The object doesn't contain the Automation object "LAST_NAME".

This field "LAST_NAME" is a required field for the primary table, the
primary record exists, all I want to do is add to the secondary table, which
is linked via parent/child link to the tables.

The process is attemtpting to use the

DoCmd.GoToRecord , , acNewRec

but the process fails with message as above. When you finally exit the
program, and inspect the table, the record that you attempted to add has been
added to the table, but I still need to get rid of the error message. I'm
not sure if the record gets added correctly on the add function or if it gets
added as the form is finally closed.

Can anyone assist?

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