anthonytr
asked on
Subform creates extra records
Hi,
I have a form with a subform. The main form is bound to to a table and the subform is bound to a query.
I open the form from another form passing an ID via OpenArgs. The Subform and main form are linked via Child and parent fields. I can enter data into the subform and all looks fine, however, when i look at the table for the subform i can see that it creates a blank entry into the table.
Does anyone know what is causing this and how to stop it?
I have a form with a subform. The main form is bound to to a table and the subform is bound to a query.
I open the form from another form passing an ID via OpenArgs. The Subform and main form are linked via Child and parent fields. I can enter data into the subform and all looks fine, however, when i look at the table for the subform i can see that it creates a blank entry into the table.
Does anyone know what is causing this and how to stop it?
are you opening the form with the 'acFormAdd' data mode switch? (as opposed to acFormEdit)
ASKER
I'm opening it with:
DoCmd.OpenForm "frm_reference_data", , , , , , batch_reference
DoCmd.OpenForm "frm_reference_data", , , , , , batch_reference
Looks OK.
This may be an invalid question but are you sure there is a blank record? (when you open a table the last record is blank; ready to enter a new record.
Can you attach the database?
This may be an invalid question but are you sure there is a blank record? (when you open a table the last record is blank; ready to enter a new record.
Can you attach the database?
There will be an asterisk (*) in the record selector and the fields with defaults will be populated so it looks like a real record but it isn't. It is just ready to add.
Looks OK.
This may be an invalid question but are you sure there is a blank record? (when you open a table the last record is blank; ready to enter a new record.
Can you attach the database?
This may be an invalid question but are you sure there is a blank record? (when you open a table the last record is blank; ready to enter a new record.
Can you attach the database?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I found the error and fix myself