Solved

Subform creates extra records

Posted on 2014-04-07
7
502 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
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
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.

 
LVL 35

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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

This is an explanation of a simple data model to help parse a JSON feed
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

777 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