Solved

Access Data Entry form with tab control and multiple pages

Posted on 2011-02-11
5
665 Views
Last Modified: 2012-05-11
Hoping to get help with this.
I have a Data Entry form. On this Form is a Tab Control with 5 Pages and on each of the pages are subforms. The Main form properties are set to data entry yes and the Record Source is tbl_Master. The first 4 pages will populate the tbl_Master as well.
 The idea is:
The Main form data and the first 4 tabs of subform data are one record that goes into the tbl_Master and the 5th tab would populate the tbl_memos

On the main form are:
CaseID (Autonumber) field
AccountNo field
AnalystName field.
 The user types in an AccountNo and chooses their name from the drop down AnalystName which issues the CaseID. This autofills some data in all forms based on the accountNo and an AfterUpdate event that opens a query.

My issue is a record is created when the user enters in the accountNo then when you click on the first tab to enter info not populated it creates another record etc for each tab so I get an error regarding creating a duplicate entry and can't move forward to enter.

How can I make the main form and first 4 tabs subforms be one record in the master table and the 5th tab be a related record in the memos table. These are related by CaseID and I have the CaseID field in the fifth tab pulling the CasedID from the Main form.

My idea is to be able to have the user Click a save button after all entry is complete to save the records instead of the data automatically updating the tables.

I am not sure how to accomplish this. Help Help!!!

Any Help is appreciated.

Kelly

0
Comment
Question by:kmoyer9717
  • 2
  • 2
5 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 250 total points
ID: 34873482
There is no point in having multiple subforms for the main record.
Just put the fields on different tabs of the tab control.
The main record will be saved when you move to the one remaining subform.
0
 
LVL 21

Assisted Solution

by:Boyd (HiTechCoach) Trimmell, Microsoft Access MVP
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP earned 250 total points
ID: 34873565
How can I make the main form and first 4 tabs subforms be one record in the master table

Simple. Don't use sub forms for the same record.

Sub forms normally should be used to view a different record.

Note: When you move from a parent form to a sub form the parent form must be saved.
0
 

Author Comment

by:kmoyer9717
ID: 34875208
got rid of the subforms on the tab controls except for the last tab which adds to a different table. This fixed the issue of the duplicate record error.
The only issue now is the data is automatically saving to the table and not showing in the form so that I can enter in what does not autofill.

Help!!!!
 Also is there a way to change the color of the tab control?
0
 
LVL 77

Expert Comment

by:peter57r
ID: 34877431
Access saves the main form record when you move from the main form to the subform.  You can't stop this happening.

I don't understand what you mean with..
"...and not showing in the form so that I can enter in what does not autofill."


0
 

Author Closing Comment

by:kmoyer9717
ID: 34899991
I am issuing the points for the subform portion of the question.

I fould a solution to the user closing out of the form with a partial record.

In the Before Update event property I put the following.

If MsgBox("Do you want to save this record ??", vbYesNo + vbDefaultButton2, "??????") = vbNo Then
  Cancel = True
  Me.Undo
End If

This prompted the user before they closed the form and if they canceled it undid the record.

Thanks for the help.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Many companies are making the switch from Microsoft to Google Apps (https://www.google.com/work/apps/business/). Use this article to learn more about what Google Apps has to offer and to help if you’re planning on migrating to Google Apps. It is …
The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

832 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