Form tries to insert row when it starts

  • Thread starter Thread starter Dennis
  • Start date Start date
D

Dennis

Hi,

I'm running Access via Office XP Pro on Windows 7.

I have a data entry form. The record source is a query (logical view of a
table) of a table where the keys are manually entered.

When I lauch the form, the form immediately tries to create a new record. I
know this because the Form_BeforeInsert event is being called. I set the key
fields values to the control values in teh Form_BeforeInsert.

I want to be able to add, edit, and delete rows from this form, but I don't
want it to try to create a row before I've had a change to enter data.

How do I get around this or correct this?



Dennis
 
On Tue, 20 Apr 2010 20:51:01 -0700, Dennis

I am not sure I understand. It is normal behavior that when you open a
form bound to an empty table, you will get a new record.
If there are existing records, you will go to the new record if the
form's DataEntry property has been set to Yes.

-Tom.
Microsoft Access MVP
 
Hi,

I'm running Access via Office XP Pro on Windows 7.

I have a data entry form. The record source is a query (logical view of a
table) of a table where the keys are manually entered.

When I lauch the form, the form immediately tries to create a new record. I
know this because the Form_BeforeInsert event is being called. I set the key
fields values to the control values in teh Form_BeforeInsert.

I want to be able to add, edit, and delete rows from this form, but I don't
want it to try to create a row before I've had a change to enter data.

How do I get around this or correct this?

Turn off the form's Data Entry property. That property is for forms whose only
purpose is to add new records, not view or edit existing ones.
 
All,

I fixed my problem. I don't know what I did to fix it. Maybe just closing
the form and Access and then re-opening it fixed it. I'm not sure.

Dennis
 
Back
Top