Solved

Adding new records to subforms

Posted on 2014-10-22
4
256 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 85

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 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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

707 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