O
OMS
Hi,
I would like to put multiple reports in an If statement without using
multiple ElseIf's (I have a few ElseIf's already). This is in a On_Click
event.
I have several with reports with similar names and was wondering if there is
some wildcard I could use ie.
If strDoc = ("*_report*) Then
or is there a way to use "Or" in the structure ie.
If strDoc = ("XYZ_report1" Or "XXX_report2" Or "XYZ_report3") Then
I've tried these and get "Type mismatch" or nothing (I haven't trapped the
error yet)
Would Select Case be a better method than If Then? Any advice?
Thanks in advance.
OMS
I would like to put multiple reports in an If statement without using
multiple ElseIf's (I have a few ElseIf's already). This is in a On_Click
event.
I have several with reports with similar names and was wondering if there is
some wildcard I could use ie.
If strDoc = ("*_report*) Then
or is there a way to use "Or" in the structure ie.
If strDoc = ("XYZ_report1" Or "XXX_report2" Or "XYZ_report3") Then
I've tried these and get "Type mismatch" or nothing (I haven't trapped the
error yet)
Would Select Case be a better method than If Then? Any advice?
Thanks in advance.
OMS