Form navigation question

G

Guest

I'm using a form with navigation buttons enabled...When I click next record
button right arrow) and I'm at the end of the table will add an empty record.
If I click next record 10 times will add 10 blank records.
How can avoid adding a new record every time when I click next?
 
A

Allen Browne

Simply moving to a new record should not cause another record to be added.

Something has to be dirtying the form when you move to a new record. For
example, you might be assigning a value to a bound control in the Current
event of the form. (There is never a valid reason for changing the value of
a field just because you visited the record, so this always represents a bad
algorithm.)

The best solution would be to find and fix whatever is dirtying the form,
but you can also prevent the addition of the new record by opening your
table in design view and setting the Required property to Yes for one of the
fields.
 

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