tags:

views:

26

answers:

1

how do i evaluate in VBA access whether the following statement is true:

([Panels] like '*IT_AMPH,*' or [Panels] like '*AMPH_SN,*' or [Panels] like '*AMPH_S,*') and
([Panels] like '*IT_BARB,*' or [Panels] like '*BARB_SN,*' or [Panels] like '*BARB_S,*')

this is going to be running in Report_Load and i need to know whether the statement returns true or false

+1  A: 

See whether the IIf() function works here.

IIf("your long statement", 1, 0)
HansUp
i can use this in VBA?
I__
Yes. You can us IIf in VBA code as well as in SQL statements. The two IIf flavors are not exactly the same, but pretty darn close for many purposes.
HansUp