Common form fields, multiple forms

soulice

Registered User.
Local time
Today, 01:06
Joined
Dec 21, 2011
Messages
41
I have a db with 7 forms. On each form there are 20 - 40 fields on each. The first 20 are the same on each form. I have a few questions... 1) best way to have data entered on first form carry over...autosave? 2) is there a more OOP way of creating a single form that is reused on each form so there is on commonality and code reuse?
 
The Fields you refer to are Form Controls.
The data in the control is often, but not allways, from a field in a table or query but on the form you have a Control - text box control, combo box control etc.

If you have a common Form design, you can reuse it by setting the form record source to be different when it is opened from a different instance (command button etc)

If you have different forms for different customers, then there is a learning curve not yet addressed.
eg, a form for customer sales is just one form, the records displayed are restricted by the opening process or some other filter you may setup.
 
That is a very unusual design. Do you have 7 tables each with 20 common fields? Perhaps you should have a single table with the common fields and separate tables with the unique fields.
For display purposes, you could design a form with the common fields on top and a tab control on the bottom and each tab could display a different subform with the unique data.
 
I have taken over the project and it is a single table. 7 forms are used to manage x number of fields each, but their are 20 fields that show on each form. May need to add an "IsDirty" check between tab navigation with forms that are opened? The users open x number of forms, then edit data as they navigate through the tabs, not always saving while on a form.
 
If all the data comes from the same table, you can either place all the controls directly on various tab pages, in which case, the data will not be saved as you move from tab to tab or create a separate subform for each page which is bound to the same record but shows different fields. In this case, the data will be saved as you move the focus from one subform to another.
 
If I go with tabs, can you navigate between them without losing what you enter then click save when ready? Sub form sounds promising as well.
 

Users who are viewing this thread

Back
Top Bottom