Mickey Flynn said:
By subform you mean just a form?
Strictly speaking, Access has no object called a Subform. Access has a
Subform Control, which in Access 97, you'll find in the ToolBox that, by
default, displays along the left side of the design window.
Steve is, I am sure, using "subform" as shorthand for "form displayed in a
Subform Control", as is common in these newsgroups. Though a common usage,
it can be confusing if you aren't aware of how it's used.
code the buttons I assume some kind of
on click event on the command button?
What would that be? Say the form I want to open in the main
frame is frmTracking.
In an example database, with a "frmSFTestMainWhite" and a SubformControl
"sbfTest", initially set with either of two Forms "frmSFTestRedSub" or
"frmSFTestBlueSub", the OnClick event
of a Command Button on "frmSFTestMainWhite" named
"cmdToggleSubformSource" is:
If Me.sbfTest.SourceObject = "frmSFTestRedSub" Then
Me.sbfTest.SourceObject = "frmSFTestBlueSub"
Else
Me.sbfTest.SourceObject = "frmSFTestRedSub"
End If
One other quick question: One of my labels is
captioned F&I but shows as F_I. How do I get
it to show the & sign?
Change the caption from "F&I" to "F&&I". Caption text uses a single & to
designate the following character for a shortcut/hotkey (and marks it by the
immediately-preceding underline).
I gather from your questions that you are not familiar with Visual Basic for
Applications (VBA) code. If you want to create "finished" or "polished"
applications, it would be good to learn some VBA.
Just a caution: I have not found my clients' users to be any happier, nor
more productive, using a configuration as you describe, nor a tab control
for application navigation, than with normal Access usage (switchboard
form -- not a Switchboard Manager generated form) main forms, navigation to
other forms either in Subform Controls or separate forms. Certain
structures of data do lend themselves to being easier for the user if
implemented in a Treeview Control, but that requires non-trivial code to
implement (it is a control that comes in Windows, but is not a "native
Access control" in the Access Toolbox).
Good luck with your application.
Larry Linson
Microsoft Office Access MVP