my iff statement only shows the now() function

rainbows

Registered User.
Local time
Today, 05:43
Joined
Apr 21, 2017
Messages
428
hi ,

=IIf([Invoice paid] Is Null, "hello",Now())
this is what i put into my form but no matter if i tick the invoice paid button or not it only shows the date i want tot to be empty until i tick the box the dispaly the date i did that .

1660927644285.png




thanks
steve
 

Attachments

  • 1660927520738.png
    1660927520738.png
    271.9 KB · Views: 90
Hi Steve,

Checkboxes in Access cannot contain Nulls. They're either True or False. Try changing your expression to:
Code:
=IIf([Invoice paid]=False,"hello",Now())
Hope that helps...
 
Thats great thank you
 
Or =IIf([Invoice paid], Now(),"hello") which is how I like to code the logic?
 
For future reference’Is null’ only works in sql. In forms, vba you need to use the isnull function
 

Users who are viewing this thread

Back
Top Bottom