How to say "when" in an expression

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all

I'm looking to write an expression that basicly says the following and I
can't work it out at all:

when "field X" is less than 100 concatanate "0" & "field X" , when "field
X" is greater or equal then 100 just show "field X"

thanks for any help in advance, I've got a funny feeling I'm just being
really stupid this afternoon.

cheers
 
If X is a Number field, can you want it to always display as 3 digits, just
set the Format property of your text box to:
000

If you need to do it in the query, type this into the Field row:
XasText: Format([X], "000")
But be aware that the result is no longer a number.
 
Thanks mate

I just formatted it as text and it worked a treat

thanks for your help

Steven


Allen Browne said:
If X is a Number field, can you want it to always display as 3 digits, just
set the Format property of your text box to:
000

If you need to do it in the query, type this into the Field row:
XasText: Format([X], "000")
But be aware that the result is no longer a number.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

naiboz said:
I'm looking to write an expression that basicly says the following and I
can't work it out at all:

when "field X" is less than 100 concatanate "0" & "field X" , when "field
X" is greater or equal then 100 just show "field X"

thanks for any help in advance, I've got a funny feeling I'm just being
really stupid this afternoon.
 
Back
Top