this or this

J

jlute

I'm trying to get:
If [Type] = "BTGL" or "BTPL" Then
[ODHeight]*[tblUOMLength_5].[inConvFactor]+0.125

otherwise
[ODHeight]*[tblUOMLength_5].[inConvFactor]

I've tried this:
ODHCap: IIf([Type]="BTGL" & "BTPL",[ODHeight]*[tblUOMLength_5].
[inConvFactor]+0.125,[ODHeight]*[tblUOMLength_5].[inConvFactor])

No good.

I'm sure I'm approaching this all wrong. Can anyone point out the
error of my ways?

Thanks!
 
K

KARL DEWEY

Try this ---
ODHCap: IIf([Type] = "BTGL" or [Type] = "BTPL",
([ODHeight]*[tblUOMLength_5].[inConvFactor]+0.125),
([ODHeight]*[tblUOMLength_5].[inConvFactor])
 
B

Bob Barrows [MVP]

I'm trying to get:
If [Type] = "BTGL" or "BTPL" Then
[ODHeight]*[tblUOMLength_5].[inConvFactor]+0.125

otherwise
[ODHeight]*[tblUOMLength_5].[inConvFactor]

I've tried this:
ODHCap: IIf([Type]="BTGL" & "BTPL",[ODHeight]*[tblUOMLength_5].
[inConvFactor]+0.125,[ODHeight]*[tblUOMLength_5].[inConvFactor])

No good.

I'm sure I'm approaching this all wrong. Can anyone point out the
error of my ways?

Thanks!

ODHCap: IIf([Type]="BTGL" OR [Type] = "BTPL",
[ODHeight]*[tblUOMLength_5].[inConvFactor]+0.125,
[ODHeight]*[tblUOMLength_5].[inConvFactor])
 
D

Dale Fye

Or:

ODHCap: [ODHeight]*[tblUOMLength_5].[inConvFactor]+
IIf([Type] = IN("BTGL", "BTPL") , 0.125, 0)

--
HTH
Dale

Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.



KARL DEWEY said:
Try this ---
ODHCap: IIf([Type] = "BTGL" or [Type] = "BTPL",
([ODHeight]*[tblUOMLength_5].[inConvFactor]+0.125),
([ODHeight]*[tblUOMLength_5].[inConvFactor])

--
KARL DEWEY
Build a little - Test a little


I'm trying to get:
If [Type] = "BTGL" or "BTPL" Then
[ODHeight]*[tblUOMLength_5].[inConvFactor]+0.125

otherwise
[ODHeight]*[tblUOMLength_5].[inConvFactor]

I've tried this:
ODHCap: IIf([Type]="BTGL" & "BTPL",[ODHeight]*[tblUOMLength_5].
[inConvFactor]+0.125,[ODHeight]*[tblUOMLength_5].[inConvFactor])

No good.

I'm sure I'm approaching this all wrong. Can anyone point out the
error of my ways?

Thanks!
 
J

jlute

Thanks, everyone! I didn't realize that I needed to reference [Type]
twice.

Dale, I just recently became familiarized with IN via John Spencer.

FYI I tried your usggestion but it has a syntax error. Of course I
"cleaned" it up to remove spaces, etc. It seems that IN is the
culprit.

Or:

ODHCap: [ODHeight]*[tblUOMLength_5].[inConvFactor]+
              IIf([Type] = IN("BTGL", "BTPL") , 0.125, 0)

--
HTH
Dale

Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.



KARL DEWEY said:
Try this ---
   ODHCap: IIf([Type] = "BTGL" or [Type] = "BTPL",
([ODHeight]*[tblUOMLength_5].[inConvFactor]+0.125),
([ODHeight]*[tblUOMLength_5].[inConvFactor])
I'm trying to get:
If [Type] = "BTGL" or "BTPL" Then
[ODHeight]*[tblUOMLength_5].[inConvFactor]+0.125
otherwise
[ODHeight]*[tblUOMLength_5].[inConvFactor]
I've tried this:
ODHCap: IIf([Type]="BTGL" & "BTPL",[ODHeight]*[tblUOMLength_5].
[inConvFactor]+0.125,[ODHeight]*[tblUOMLength_5].[inConvFactor])
No good.
I'm sure I'm approaching this all wrong. Can anyone point out the
error of my ways?
Thanks!- Hide quoted text -

- Show quoted text -
 
D

Dale Fye

Oops, that should have been:

ODHCap: [ODHeight]*[tblUOMLength_5].[inConvFactor]+IIf([Type] IN("BTGL",
"BTPL") , 0.125, 0)

I added an = sign where I shouldn't have, right before the IN clause.

Dale

Thanks, everyone! I didn't realize that I needed to reference [Type]
twice.

Dale, I just recently became familiarized with IN via John Spencer.

FYI I tried your usggestion but it has a syntax error. Of course I
"cleaned" it up to remove spaces, etc. It seems that IN is the
culprit.

Or:

ODHCap: [ODHeight]*[tblUOMLength_5].[inConvFactor]+
IIf([Type] = IN("BTGL", "BTPL") , 0.125, 0)

--
HTH
Dale

Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.



KARL DEWEY said:
Try this ---
ODHCap: IIf([Type] = "BTGL" or [Type] = "BTPL",
([ODHeight]*[tblUOMLength_5].[inConvFactor]+0.125),
([ODHeight]*[tblUOMLength_5].[inConvFactor])
I'm trying to get:
If [Type] = "BTGL" or "BTPL" Then
[ODHeight]*[tblUOMLength_5].[inConvFactor]+0.125
otherwise
[ODHeight]*[tblUOMLength_5].[inConvFactor]
I've tried this:
ODHCap: IIf([Type]="BTGL" & "BTPL",[ODHeight]*[tblUOMLength_5].
[inConvFactor]+0.125,[ODHeight]*[tblUOMLength_5].[inConvFactor])
No good.
I'm sure I'm approaching this all wrong. Can anyone point out the
error of my ways?
Thanks!- Hide quoted text -

- Show quoted text -
 
Top