Button to open form

  • Thread starter Thread starter Luis
  • Start date Start date
L

Luis

Hello.
I have a form with two buttons and an unbound subform.
What i'd like to do is, depending on the button i click,
the subform displays the corresponding form. This means
that the Source object of the subform changes depending of
the button clicked.

How can i do this ?

Thanks
 
Luis said:
Hello.
I have a form with two buttons and an unbound subform.
What i'd like to do is, depending on the button i click,
the subform displays the corresponding form. This means
that the Source object of the subform changes depending of
the button clicked.

How can i do this ?

I would use Toggle Buttons instead within an OptionGroup. Then you can
just use the Change event of the Group.

Select Case Me.OptionGroupName
Case 1
Me.SubFormControlName.SourceObject = "SomeForm"
Case 2
Me.SubFormControlName.SourceObject = "SomeOtherForm"
End Select

You "could" stay with Command Buttons but then you would need to create two
separate event procedures instead of just the one.
 
Ok. Thank you very much. I'll give it a try.

-----Original Message-----


I would use Toggle Buttons instead within an OptionGroup. Then you can
just use the Change event of the Group.

Select Case Me.OptionGroupName
Case 1
Me.SubFormControlName.SourceObject = "SomeForm"
Case 2
Me.SubFormControlName.SourceObject = "SomeOtherForm"
End Select

You "could" stay with Command Buttons but then you would need to create two
separate event procedures instead of just the one.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


.
 
Isn't a tab control a useful alternative? Perhaps people should be
suggesting the tab control more often.

Of course, I have not used a tab control in Access Basic, but I have in VB
and VC. I assume they are as easy in Access Basic as in VB. If not, then I
apologize for not knowing.
 
Back
Top