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 LinkMasterField s 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_Cha nge
Dim prp As Property
Set prp = Me.frmsubGeneri c.Properties("S ourceObject")
Select Case Me.tabMain.Valu e
Case Me.pgeUnit.Page Index
prp = "frmUnit"
Case Me.pgeVehicleTy pe.PageIndex
prp = "frmVehicleType "
Case Else
MsgBox "I don't know what to do with tab " & Me.tabMain.Valu e & "."
End Select
Exit_tabMain_Ch ange:
Set prp = Nothing
Exit Sub
Err_tabMain_Cha nge:
MsgBox "Error " & Err.Number & " - " & Err.Description
Resume Exit_tabMain_Ch ange
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*********@co mcast.net> wrote in message
news:sd******** ************@co mcast.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?