Solved

Access Data Entry form with tab control and multiple pages

Posted on 2011-02-11
5
648 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

We were having a lot of "Heartbeat Alerts" in our SCOM environment, now "Heartbeat" in a SCOM environment for those of you who might not be familiar with SCOM is a packet of data sent from the agent to the management server on a regular basis, basic…
This collection of functions covers all the normal rounding methods of just about any numeric value.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now