Subform question

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

Guest

Is it possible select a specific subform based upon data that is in a text
box on the main form.

For example, I control three different shops each with their own training
requirements and when I select Training on a tab control, I would like the
subform to be displayed to only contain that particular shop's requirements.

What I want to do is create three separate subforms each based upon their
own table that is linked to the main table and when I select someone whose
shop is Avionics, I want the Avionics training subform to be displayed.

Thanks
Dan
 
You can acheive this by changing the "SourceObject" property of the
subform control on the main form.

For example, in your main form "Current" event procedure :

If txtCtrl.Value "Avionics" Then
Me.sfmCtrl.SourceObject = "frmAvionics"
Else
....

Hope this helps !


Strike Eagle a couché sur son écran :
 

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

Similar Threads


Back
Top