[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Access Data Entry form with tab control and multiple pages

Posted on 2011-02-11
5
Medium Priority
?
765 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

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.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

650 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