Solved

Adding new records to subforms

Posted on 2014-10-22
4
228 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:ScootterP
  • 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:ScootterP
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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Use a Combo-Box to do a Search 26 26
Normalization of a table 19 70
Access report groups with sums 5 26
Column Layout in Access Xp VBA Report 3 19
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
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 …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

785 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