Solved

Subform creates extra records

Posted on 2014-04-07
7
497 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
  • 3
  • 3
7 Comments
 
LVL 7

Expert Comment

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

Author Comment

by:anthonytr
Comment Utility
I'm opening it with:

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

Expert Comment

by:COACHMAN99
Comment Utility
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 34

Expert Comment

by:PatHartman
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
I found the error and fix myself
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

A short article about a problem I had getting the GPS LocationListener working.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now