New Record Not Created

  • Thread starter Thread starter J. Todd Spradlin
  • Start date Start date
J

J. Todd Spradlin

In an Access application I have developed closing one form
opens another in order to add a new record. Some data are
transferred from the first form to the new record on the
second form.

DoCmd.OpenForm "New Admit"
DoCmd.GoToRecord, "New Admit",acNewRec

After I enter the remaining fields and close/save the form
I discover that the new record was not created. And no
error messages are displayed in the process.

I have ensured that the properties of the form allow
addition of new records, and that all required fields
contain data.

Any ideas?

Thanks,

Todd
 
Todd,

Just guessing here... is your form's recordsource a query? If so, does the
query contain several tables? If that's the case then chances are the
recordset (returned by the query...) is not updatable. To verify open the
query in datasheet view and try to change or add a record, to see if it lets
you do it.
If this is indeed the problem, then the reason why you get no error message
is probably a SetWarnings action in a query / method in code.

HTH,
Nikos
 
J. Todd Spradlin said:
In an Access application I have developed closing one form
opens another in order to add a new record. Some data are
transferred from the first form to the new record on the
second form.

DoCmd.OpenForm "New Admit"
DoCmd.GoToRecord, "New Admit",acNewRec

After I enter the remaining fields and close/save the form
I discover that the new record was not created. And no
error messages are displayed in the process.

I have ensured that the properties of the form allow
addition of new records, and that all required fields
contain data.


The new form may not have had time to be in a state of to be
able to goto a new record (Load event). It might be better
for the new form to "pull" the data from the first form
instead of trying to "push" the data into the new form.
 
Back
Top