?
Solved

Access Data Entry form with tab control and multiple pages

Posted on 2011-02-11
5
Medium Priority
?
730 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
[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
  • 2
5 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 1000 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 1000 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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
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 …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

752 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