Solved

MS Access 2013 Multiple Forms Relating to Same Record

Posted on 2013-12-20
7
1,995 Views
Last Modified: 2013-12-24
I am using MS Access 2013 in an attempt to create a Form-driven database.  

Suppose I have 2 forms-- I enter data into several Text Box's in Form One, then, using a Control Button ('Next') I open Form 2 and continue entering data into that form's Text Boxes. The idea here is to have a string of Forms from which I can enter data, and that data is saved to the same record in a Table.  

The problem I am facing is that data entered into Form One is placed in Record 1 on my Table, while data entered into Form Two is placed in the next Record (Record 2).  

Question:  How can I create a string of Forms, but have the data inputted into each of those Forms show up on the same Record in the same Table?

*Note:  I do not want advice that starts with the phrase "Why are you doing it that way..."  Let's just assume that there is a reason my program has to work this way.  If you can help me out with this problem-- without deviating from scenario presented; it would be MUCH appreciated.
0
Comment
Question by:mdstalla
  • 4
  • 2
7 Comments
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 39732740
You'll need to go the unbound approach.  That is all the controls and form(s), will be un-bound (no control or record source).

It will be up to you to handle all the CRUD (Create, Read, Update, and Delete) operations using SQL Statements and the populating and reading of the controls.

Jim.
0
 
LVL 57
ID: 39732749
One other approach that might suffice for your needs:

A main form with a tab control.   In this way, you could do a wizard type approach where you take the user from tab to tab, hiding the other tabs so all they see is a single tab at a time.

This would let you continue to use bound forms and controls.  

If having seperate forms is a requirement though, then it will have to be the un-bound approach.  There simply is no way to work with the same record across multiple forms.

Jim.
0
 
LVL 30

Expert Comment

by:hnasr
ID: 39732932
One way:

First form to create the record filling the relevant fields.
Form 2 updates the same record, populating the next group of fields in the record.
And so on.
0
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

 
LVL 57
ID: 39732941
<<First form to create the record filling the relevant fields.
Form 2 updates the same record, populating the next group of fields in the record.
And so on. >>

 Yeah that will work,  but only if he can live with saving the record between each form.

Jim.
0
 
LVL 30

Expert Comment

by:hnasr
ID: 39733794
"but only if he can live with saving the record between each form."

That depends on the design of the application. Usually there is a next and previous buttons to guarantee the completion of the record. Last step is finish which flags record as accepted, otherwise a cleanup of unfinished record, if cancel is issued.
0
 
LVL 57
ID: 39735889
If they really want to stick with a bound approach, then the best setup would be to bind the forms to a temp table and copy the record into the main table when finished.

From a design point I would not rely on cleaning up an un-finished record if something stopped the add operation when bound directly to the main tables,

Too many things to go wrong and then you have a record saved which could cause all kinds of problems.

Needs to either go un-bound and avoid saving the record at all, using a single form with a tab control, or go with a series of bound forms against a temp table and copy the finished record when done.

Jim.
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 39735903
No points please, I prefer to use the temp table mentioned by Jim, especially if the multiple form method is required.

Personally, for a multi-step process like what is defined above, I prefer to go with a tabbed form (tabs hidden) and Next/Back buttons, all bound to that temp table.  That way, changes don't have to be saved between each step (all one form) and if the user doesn't complete the process, the record is never written to the main database table.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Article by: Leon
Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

705 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

19 Experts available now in Live!

Get 1:1 Help Now