Subform question

J

jackrobyn1

Is it possible to have a form FRM1 as my main form and a way of choosing
which subform to view, i have 2 i would like to have as subforms, "Vehicles"
and "employees". In effect what i mean is one form FRm1 that has 2 buttons in
the form footer one that changes the viewed subform to employees, the other
button changes the viewed subform to vehicles.
 
R

Rick Brandt

jackrobyn1 said:
Is it possible to have a form FRM1 as my main form and a way of
choosing which subform to view, i have 2 i would like to have as
subforms, "Vehicles" and "employees". In effect what i mean is one
form FRm1 that has 2 buttons in the form footer one that changes the
viewed subform to employees, the other button changes the viewed
subform to vehicles.

Either use one subform control and use your code to change its SourceObject
property or just use a TabControl with each TabPage containing a subform.
 
P

Pieter Wijnen

or have 2 subforms 1 visible & 1 not
& use code similar to this

Private sub cmdVehicle_Click()
me.employees.visible = false
me.vehicles.visible=true
end sub

HtH

Pieter
 

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

Top