Solved

Adding new records to subforms

Posted on 2014-10-22
4
248 Views
Last Modified: 2014-10-22
I am using Access 2007.  I have a form with about 25 fields and also 3 subforms.  I would like to link the subforms so the data automatically saves, but I also would like the subfroms to be clear of data when entering the new record.  Is there a way to do this?
0
Comment
Question by:Scott Palmer
[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
  • 2
4 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 250 total points
ID: 40397247
the very important thing to consider here is that,
the tables that you use as the record source of the subform must have a field that correspond to the UNIQUE record id field of the table that you use as the record source of your main form.

see this link  Create a form that contains a subform

take note on how to set the Master Fields and Child Fields property of the subform.



.
0
 
LVL 84

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 250 total points
ID: 40397598
but I also would like the subfroms to be clear of data when entering the new record.
Access should handle that natively. If you move to a new record - for example, use DoCmd.RunCommand acCmdNewRecord - Access should automatically move you to a new record, and all the fields should be blank, unless you've defined Default values at the Table, Form or Control level.
0
 

Author Comment

by:Scott Palmer
ID: 40398020
The record would not natively clear the records even when i used the new record command.  It would just take me the bottom of the records.

Scott
0
 
LVL 84
ID: 40398059
It won't "clear" the existing records, but it would instead take you to the new record section. You really can't do what you're after unless you create a separate "Add Record" form, and that's somewhat clunky.
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

738 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