473,395 Members | 1,763 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Access: Reducing several very similar forms to a single form (not so trivial)

Greetings!

I am currently working on a fairly large Access project for my employer (an insurance company). In addition to the main menu and a number of forms, I have 18 separate forms, which fulfil essentially the same functionality, albeit with enough variation to make it difficult to fit it into a single form altogether. It almost goes without saying, that even minor layout changes are a major inconvenience. I would like to ask you, if you have any ideas on how to fit these separate static forms into one dynamic form.

About the system: It is a deal capture system for financial transactions. The primary functionality is to be able to save information about a transaction to a database and then be able to edit a transaction afterwards. However, there are 9 different financial instruments, which all have different fields; hence, depending on the instrument, the relevant form displays the appropriate fields. Additionally, there are two forms for each instrument, a create form and an edit form. This results in 2*9=18 very similar forms. My thought is that it would be neat to have one form, which could take account of the instrument and whether the transaction is being created or edited. However, it is not apparent to me how this should be accomplished; it also seems there are no discussions anywhere on the matter.

Below is an example of one of the forms. All 18 forms are similar in functionality and layout, but thir fields (as well as the number of these) vary. Also, some of the text boxes display calculated values based on VBA functions.



Any ideas and suggestions are warmly welcomed, I have been toiling with this problem for some time by now, but to no resolve.
Aug 24 '10 #1
6 1349
NeoPa
32,556 Expert Mod 16PB
Ideas would include designing controls for all requirements. Common controls need appear only once, but the controls that are required for all of the forms should also be designed in the one, all-purpose, form.

In the Form_Load() event procedure you can hide and show controls depending on your requirements, as well as move their positions and sizes around. This is the general approach behind flexible forms.

Another, simpler, approach would be to use Tab Controls, or Pages, to have the various definitions on a single form and simply force the required Page in the same procedure.

While the first may be a little more fiddly, I find it actually easier in the long run (but then I have little experience with Tab Controls).

Welcome to Bytes!
Aug 24 '10 #2
patjones
931 Expert 512MB
Bear in mind that it is possible to use the same form for both data entry and retrieval. Granted, doing that would still leave you with nine separate forms, but it is an improvement!

What you should do is take a long look at each control and categorize each one as 'common' or 'instrument specific'. One approach that you could take is to sensibly organize your common controls in the upper portion of a consolidated form, and then have the instrument specific controls arranged in tabs on the bottom portion of the form. Essentially, this approach would be a hybrid of what NeoPa is suggesting.

One other minor point...I notice in your sample form that the text and combo boxes are all the same width. If you adjust the width of the various controls to correspond to what will go in the control, you'll have more flexibility in laying them out on the form. For instance, you may want to put two text boxes on the same 'line' if their width permits it, and if they contain related information.

Layout definitely matters. It can make a form much easier to use if it is done right.

Pat
Aug 24 '10 #3
munkee
374 256MB
I would say take a look at tabbed controls as neopa stated, however keep back ups of your old system layout as you may find that the form takes a long time to load when you use tabs.

Tabs essentially just split your huge long form in to sections allowing you to click a tab or button to switch between the section that is visible. A draw back of this is that when the form loads it will need to load every control, which can take time.

There is actually a solution to this that has been found but I cant remember the exact location, but a google of "ms access tab control load on demand" might come up with the answer again. This basically only loads the data for the current tab when it is required.

I would also look in to grouping everything that is common on each of your forms to the top of the page and you can just give this section a name.

Below that you can have a sub form. This subform can have content loaded in to it dependent on a selection made in a combobox/dropdown menu. So the common information will be filled out, then the user will select the reamining work stream, this will tell the combobox which page to point the subforms recordsource towards and voila.

Your tables would likely need some tweaking so that your subform data is held in seperate child tables, whilst your main form data is held within a main parent table.
Aug 25 '10 #4
Thank you for the advice and the nice welcome!

@NeoPa
Is there a particular advantage to Form_Load() compared to Form_Open? I think I will give this approach a try today – I have no prior experience with tabs, so that’s plan B.

@Zepphead80
I agree with you, there are changes which could improve the readability of the form. However, the layout has been specified to me by those who will be using the system. They are using it in its current layout and are happy with it.

@Munkee
I like the idea of using a subform to swap the variable fields. The biggest problem with this approach is that it would likely be too complicated to strip the transactions out of the current catch-all table and place them in separate tables. That would entail changes to the majority of the other system components to accommodate this change.

Once again, thanks for the replies, they are much appreciated! I'll try be back with an update later today!
Aug 25 '10 #5
munkee
374 256MB
Open (form) → Load (form) → Resize (form) → Activate (form) → Current (form) → Enter (control) → GotFocus (control)

Form open just occurs before form load and I believe is cancellable. So you are able to perform some easy security checks in Form open and if they fail cancel the opening before anything is loaded in.

It is as simple as
Expand|Select|Wrap|Line Numbers
  1. Cancel = True
It is important to remember form Open will only occur as the name suggests, as the form opens. If you have a form that is in the background and you bring it back into focus form open will not fire again. So it is important to understand the event order to ensure your code resides in the correct one.
Aug 25 '10 #6
NeoPa
32,556 Expert Mod 16PB
AHetland:
Is there a particular advantage to Form_Load() compared to Form_Open? I think I will give this approach a try today - I have no prior experience with tabs, so that’s plan B.
I think Chris (Munkee) has answered that first point adequately. I see no good reason you shouldn't use Form_Open if you prefer for this.

As for the Tabbed form - I would not recommend using that unless you find the other approach too difficult. That and subforms would tend to highlight the differences, while I'm guessing you want each usage to have the appearance of being designed for purpose. I suppose what I'm saying is that having a design where the differences are handled in a way visible to the operator would be inappropriate.

I only raised the subject originally to cover the scenario where you felt handling the design in code beyond your scope.
Aug 25 '10 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Matt C. | last post by:
I've got an application that has several distinct functions. I'd like to make these available as different screens that the user can switch between within a single form, using commands from the...
4
by: Soryt | last post by:
Hi everyone ! 1) An example from help: "Each Form object has a Controls collection, which contains all controls on the form. You can refer to a control on a form either by implicitly or...
1
by: Brad L. Meyer | last post by:
Hi all! Happy Holidays to all! I work for a nonprofit 501.3.c case management agency. All of the computers have MS ACCESS database software installed. Is it possible to recreate agency...
15
by: Paul T. Rong | last post by:
Hi everybody, This time a very very difficult case: I have a table "tblStudent", there are 50 students, I also made a form "frmStudent" based on "tblStudent", now if I don't want to show all...
1
by: Dan | last post by:
Is it possible to access controls on other forms when using managed C++? In VB, it was a simple matter of declaring the form as global, but this is apperently not possible when using managed code....
8
by: TORQUE | last post by:
Hi, I am having some trouble with recording a field on a form into my Table after formatting it to calculate several fields on the form. If i just put the amount in the field and have it linked...
5
by: neehakale | last post by:
Im new to C# and im doing a project that requires to integrate many forms in a single form. for eg, Form1 is my main form. when i clicked on a button or links in the main form the new form should...
1
by: gershwyn | last post by:
Hey all, another question about split forms in Access 2007. Hopefully this one is a quick one. I have a bound spit form for data entry. The split form portion does not allow edits. I want it to be...
2
by: burntbit | last post by:
I've been trying to select the 2nd form out of 20+ forms in a page. And it happens to be the only form in the page with a name 'send_form'. I've tried br.select_form(nr=1) and...
2
by: p4willi | last post by:
Hi not sure if my earlier post was sent due to idle time so here I go again.... On my main form when I press the save button it has to loop through several sub forms within tabs and determine if...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.