Re: Textbox with "!" if value is negative, or actual number if positive (AC2007)
The Format property supports a system where numeric values can be substituted by strings based on the value. Four options separated by semicolons are provided.
Positive;Negative;Zero;Null.
Each supports the same strings definitions as the Format function.
In this case it should have been:
#;/X
The forward slash is the literal escape forcing the next character to be displayed literally. Access will automatically change quoted strings to this syntax sometimes.
Sometimes it leaves out the backslash because it only needs to escape letters that mean something, generally those in the Date format strings, y,m,d,h,n,s but also some others (like X) for reasons I don't really understand. I suspect they may mean something in other languages.
The eight standard access colours can also be included in the four options.
For example this shows negative values inside parentheses and coloured red:
#;(#)[red]