• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 529
  • Last Modified:

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?
0
anthonytr
Asked:
anthonytr
  • 3
  • 3
1 Solution
 
COACHMAN99Commented:
are you opening the form with the 'acFormAdd' data mode switch? (as opposed to acFormEdit)
0
 
anthonytrAuthor Commented:
I'm opening it with:

DoCmd.OpenForm "frm_reference_data", , , , , , batch_reference
0
 
COACHMAN99Commented:
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?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
PatHartmanCommented:
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.
0
 
COACHMAN99Commented:
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?
0
 
anthonytrAuthor Commented:
I reset the database and re-created to the forms and subforms and the error has gone away.  Strange - not quite sure what was causing it.
0
 
anthonytrAuthor Commented:
I found the error and fix myself
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now