iif Statement in Default Value

travismp

Registered User.
Local time
Today, 23:03
Joined
Oct 15, 2001
Messages
386
Is it possible to add an Iif Statement to a default value?

Code:
IIf([hours],"YES","NO")

This does not work?
 
Where are you trying to do this? At the table or form level? And '[hours]' doesn't make a lot of sense as an expression to evaluate... :)
 
I don't think you can do this because an IIF statement is not a value.
I have done this before by adding code to the OnLoad event of the form.
Try adding your code there....... except you woulg write it like
Code:
If Me!Hours = 0 then 
me!OUTPUT = "YES"
Else
me!OUTPUT = "NO"
End if
 
I have not ever done this either. Someone else needed to know. I can make an update query to do the same thing. Thanks guys.
 

Users who are viewing this thread

Back
Top Bottom