?
Solved

Adding new records to subforms

Posted on 2014-10-22
4
Medium Priority
?
273 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 1000 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 85

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 1000 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 85
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

Industry Leaders: 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!

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
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.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Suggested Courses

762 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