Form tries to insert row when it starts

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
 
T

Tom van Stiphout

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
 
J

John W. Vinson

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.
 
D

Dennis

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
 

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