423,851 Members | 2,762 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,851 IT Pros & Developers. It's quick & easy.

Themed Tab Control work-around

P: n/a
It seems that the only way to make themed AND classic Windows GUIs look okay
with tab controls and subforms, due to the color issue, is to place a one
page-no button tab control on each subform that will be displayed as part of
a main form's tab control, completely covering the subform's detail, and
then pasting all the controls onto it. However, this is major cosmetic
surgery.

1. Is there some secret way to re-attach event procedures to controls after
cutting from a form and pasting on a tab control?

2. How much overhead will 16 extra tab controls on 16 subforms create, and
will it matter on a fast machine?

--
Darryl Kerkeslager

Power corrupts.
Absolute power corrupts absolutely.
Knowledge is power.
See www.adcritic.com/interactive/view.php?id=5927
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
A1. Not really.
In A2003, you could try cutting all the text from the form's module, and
pasting it back in. You may find that Access enters the [Event Procedure]
for you beside the appropriate properties. (MZTools claims to do
cut'n'paste-with-event-procedures, but I haven't verified that. Download
from www.mztools.com.)

A2. 16 subforms
If you don't need all these loaded at once, another option is to place a tab
control on a form, and make it not very tall (<1 inch.) Below the tab
control, add a single subform control so it sits directly on the form. Use
the tab control's Change event to load the desired subform into the single
generic subform control. Example below. The form loads very fast (one one
subform), and it's very memory efficient.

You may find you have to set the LinkMasterFields and LinkChildFields after
changing the SourceObject, as Access is likely to set these to whatever if
feels like.

Private Sub tabMain_Change()
On Error GoTo Err_tabMain_Change
Dim prp As Property

Set prp = Me.frmsubGeneric.Properties("SourceObject")

Select Case Me.tabMain.Value
Case Me.pgeUnit.PageIndex
prp = "frmUnit"
Case Me.pgeVehicleType.PageIndex
prp = "frmVehicleType"
Case Else
MsgBox "I don't know what to do with tab " & Me.tabMain.Value & "."
End Select

Exit_tabMain_Change:
Set prp = Nothing
Exit Sub

Err_tabMain_Change:
MsgBox "Error " & Err.Number & " - " & Err.Description
Resume Exit_tabMain_Change
End Sub
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Darryl Kerkeslager" <ke*********@comcast.net> wrote in message
news:sd********************@comcast.com...
It seems that the only way to make themed AND classic Windows GUIs look
okay with tab controls and subforms, due to the color issue, is to place a
one page-no button tab control on each subform that will be displayed as
part of a main form's tab control, completely covering the subform's
detail, and then pasting all the controls onto it. However, this is major
cosmetic surgery.

1. Is there some secret way to re-attach event procedures to controls
after cutting from a form and pasting on a tab control?

2. How much overhead will 16 extra tab controls on 16 subforms create, and
will it matter on a fast machine?

Nov 13 '05 #2

P: n/a
"Allen Browne" <Al*********@SeeSig.Invalid> wrote
A2. 16 subforms
If you don't need all these loaded at once, another option is to place a
tab control on a form, and make it not very tall (<1 inch.) Below the tab
control, add a single subform control so it sits directly on the form. Use
the tab control's Change event to load the desired subform into the single
generic subform control. Example below. The form loads very fast (one one
subform), and it's very memory efficient.


Hmmmmm ... wish I had known this six months ago. This would be more like a
sex change than "cosmetic surgery". Still, it may be worth it.

Thanks

--
Darryl Kerkeslager

Power corrupts.
Absolute power corrupts absolutely.
Knowledge is power.
See www.adcritic.com/interactive/view.php?id=5927

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.