Stop subform creating blank record

Crash_Pie

Registered User.
Local time
Tomorrow, 07:26
Joined
Feb 15, 2007
Messages
36
Hi all

I have a database containing information about students. On one of my forms the user selects a course number and student name and then a subform (based on a select query) displays other information about the trainee. Instructor comments etc.

At the moment whenever someone scrolls down to view all of the information on the (continuous) subform, after they have finished and wish to exit the main form a new record is created by the subform. How do I stop that from happening? I have the subform set for no additions, no edits, and Data Entry also set to no.

I'm sure I've seen a similar stiuation on here before but after all sorts of searches I haven't found the answer.

Any guidance appreciated.
 
You probably have code that is dirtying the record in the subform which will force Access to create a new record. Remove any code you have that modifies data in the form so that it doesn't run until the BeforeInsert event or later.
 
Hi there,

I'd suggest you to set the Allow Additions = No property in Form | Data

in that way, you'll be free from blank new record :-)
 

Users who are viewing this thread

Back
Top Bottom