Save Record

  • Thread starter Thread starter eric
  • Start date Start date
E

eric

Hello,

I have a table 'schTEACHER' that contains the fields
[SchoolID], [ID#], [SchoolYearID], as well as 10 others.
The first three fields that I noted are primary keys for
the table.

The problem I'm having is when the form is opened, the
primary key fields are set to a previous forms values.
If the form is closed, a record is created
in 'schTEACHER' even though this should not necessarily
be the case.

How can I confirm whether or not the record should be
created?

Thanks,

eric
 
eric said:
Hello,

I have a table 'schTEACHER' that contains the fields
[SchoolID], [ID#], [SchoolYearID], as well as 10 others.
The first three fields that I noted are primary keys for
the table.

The problem I'm having is when the form is opened, the
primary key fields are set to a previous forms values.
If the form is closed, a record is created
in 'schTEACHER' even though this should not necessarily
be the case.

Just opening a form to a new record position should NOT cause a record to
be created. Even if you have default values assigned to the fields or form
controls. However; if you have a macro or code procedure that is *setting*
the values in any controls when you move to the new record position, then
this will cause a record to be created unless the user does something to
cancel it before navigating or closing the form.

Do you have anything like this, perhaps running in the form's Current
event?
 
Back
Top