Solved

Subform creates extra records

Posted on 2014-04-07
7
511 Views
Last Modified: 2014-04-18
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
Comment
Question by:anthonytr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 7

Expert Comment

by:COACHMAN99
ID: 39984758
are you opening the form with the 'acFormAdd' data mode switch? (as opposed to acFormEdit)
0
 

Author Comment

by:anthonytr
ID: 39984760
I'm opening it with:

DoCmd.OpenForm "frm_reference_data", , , , , , batch_reference
0
 
LVL 7

Expert Comment

by:COACHMAN99
ID: 39984781
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 37

Expert Comment

by:PatHartman
ID: 39986137
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
 
LVL 7

Expert Comment

by:COACHMAN99
ID: 39986251
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
 

Accepted Solution

by:
anthonytr earned 0 total points
ID: 39997292
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
 

Author Closing Comment

by:anthonytr
ID: 40008421
I found the error and fix myself
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Six Sigma Control Plans
Introduction to Processes

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question