XelaIrodavlas
Registered User.
- Local time
- Today, 00:13
- Joined
- Oct 26, 2012
- Messages
- 175
Hi All,
Sorry if this is a dumb question, is it possible to use a select case statement in conjunction with a with statement? Specifically I am trying to test if the control sources of different subforms are null.
I could do this easily with nested Ifs, but would prefer to use select case if possible, as this will have quite a few levels when I'm done.
The purpose of this is to test what subforms have been loaded, as they sit in a tab control, and aren't loaded until the user clicks onto that tab (saves time opening the main form) To illustrate, this is what I'm trying to achieve:
But running this returns a Type mismatch on the first line 'select case'
Any ideas??
Thanks all
Sorry if this is a dumb question, is it possible to use a select case statement in conjunction with a with statement? Specifically I am trying to test if the control sources of different subforms are null.
I could do this easily with nested Ifs, but would prefer to use select case if possible, as this will have quite a few levels when I'm done.
The purpose of this is to test what subforms have been loaded, as they sit in a tab control, and aren't loaded until the user clicks onto that tab (saves time opening the main form) To illustrate, this is what I'm trying to achieve:
Code:
Selects case with Forms!MyForm
case !Subform1.controlsource = ""
msgbox "Subform 1 is unbound!"
case !subform2.controlsource = ""
msgbox "Subform 2 is unbound!"
end with
end select
But running this returns a Type mismatch on the first line 'select case'
Any ideas??
Thanks all
