Creating tab pages in a form based on multiple tables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have 5 tables in a legal unit database: Case Info, Doc Request Info,
Witness Info, General Request Info. These tables contain approximately 30
fields in total. Each case may have many document requests, many witnesses,
and/or many general info requests. The database currently has one data entry
form for each of these tables. However, some of the fields are common to all
of the forms and it is cumbersome to retype common info in each page.

I would like to set up a form with multiple page tabs, but since the fields
are on 4 different tables, I can't get all the fields I need into the page
tabs. Is there a way to select all the fields I need for these tabs without
putting them on one table?
 
If I understand your problem correctly, I think that this can be solved by
creating subforms for your tabs. Just plop copies of the existing forms into
the tabs and change the data sources to queries that link the datasources via
a CaseID for example. HTH.
 
The primary problem here is database design. If these fields are common to a
case, then they should be in the case table; otherwise, your database is not
well normalized. Were the database correctly constructed, this would not be
an issue.

That not withstanding, you can construct your form to reduce data entry.
Use the After Update event of the controls for the common fields to update
the field on all the pages when any one of them is updated.

Private Sub txtCommon1_AfterUpdate()
Me.txtCommon2 = Me.txtCommon1
Me.txtCommon3 = Me.txtCommon1
Me.txtCommon4 = Me.txtCommon1
End Sub

Private Sub txtCommon2_AfterUpdate()
Me.txtCommon1 = Me.txtCommon2
Me.txtCommon3 = Me.txtCommon2
Me.txtCommon4 = Me.txtCommon2
End Sub

etc.
 
Thanks for the info. This worked!

kingston via AccessMonster.com said:
If I understand your problem correctly, I think that this can be solved by
creating subforms for your tabs. Just plop copies of the existing forms into
the tabs and change the data sources to queries that link the datasources via
a CaseID for example. HTH.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top