G
Guest
I want the OnPrint of a report to check three fields and run code if any ONE
of the conditions is met:
Iif ([MyTextOne]=1 OR [MyTextTwo]=2 OR [MyTextThree]=3) Then
RunSomeCode
Else
RunOtherCode
I thought of using Select Case and calling procedures as each condition is
met:
Select Case Me![MyTextOne]
Case is = 1
Call Check2
Case else
Stop
End Select
Check2 ()
Select Case Me![MyTextTwo]
Case is = 2
Call Check3
Case else
Stop
End select
Check3 ()
and so on.........
It will work, but gets a bit too long as the test conditions increase. It
gets just as long with nested select case or nested IIf.
of the conditions is met:
Iif ([MyTextOne]=1 OR [MyTextTwo]=2 OR [MyTextThree]=3) Then
RunSomeCode
Else
RunOtherCode
I thought of using Select Case and calling procedures as each condition is
met:
Select Case Me![MyTextOne]
Case is = 1
Call Check2
Case else
Stop
End Select
Check2 ()
Select Case Me![MyTextTwo]
Case is = 2
Call Check3
Case else
Stop
End select
Check3 ()
and so on.........
It will work, but gets a bit too long as the test conditions increase. It
gets just as long with nested select case or nested IIf.