form recordsource returns zero records

D

David

My form recordsource sometimes returns zero records, thats ok but my continuous form bound to the recordsource data shows a record with what appears to be the next autonumber. This is in addition to the autonumber line for adding a new record
Is this normal? and if so, how do I get rid of this spurious record? I can find anything like an 'on no data' event.
 
V

Van T. Dinh

No, this is not normal. It should only shows
the "(AutoNumber)" row.

Watch out for these "phantom" Records in your Table.

When this happens (with the Focus on the spurious row),
use the Debug window to check the Dirty Property. If
Dirty = True, ther may be phantom Records in your Table.

Have you checked your VBA code behind the Form?

HTH
Van T. Dinh
MVP (Access)



-----Original Message-----
My form recordsource sometimes returns zero records,
thats ok but my continuous form bound to the recordsource
data shows a record with what appears to be the next
autonumber. This is in addition to the autonumber line for
adding a new record.
Is this normal? and if so, how do I get rid of this
spurious record? I can find anything like an 'on no data'
event.
 
D

Dirk Goldgar

David said:
My form recordsource sometimes returns zero records, thats ok but my
continuous form bound to the recordsource data shows a record with
what appears to be the next autonumber. This is in addition to the
autonumber line for adding a new record. Is this normal? and if so,
how do I get rid of this spurious record? I can find anything like an
'on no data' event.

It could be that you have some code in your form's Open, Load, or
Current event that modifies the current record in some way, thus
"dirtying" the record, forcing the generation of the next autonumber,
and causing another "new record" row to be displayed.
 

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