Sorry, I'm not doing a very good job of explaining myself. I used your
idea
to get the time to show up, so thank you so much for that!! Now I just
need
it to work with the checkbox I have bound to it.
I have a checkbox field called "testcheck" and it is bound to a text field
called "testfield". When the box is initially checked, I can get the time
to
show up, but when the box is unchecked again, the time will remain and I
would like it to disappear when the box is unchecked. I thought the IIF
function would work by telling it to show me the time if the checkbox is
True, but to show a blank if it is False? Is this not the correct
function I
should use for that?
Thank you so much for taking the time to help this newbie out! It is
appreciated more than you know!
Sue Mosher said:
If you used the date/time function picker in the formula editing dialog,
you'd see that the function you're looking for is Time(), which is the
time
component of Now(). In other words, you don't need both. If you want to
add
an hour, you can use the DateAdd() function.
The name of the checkbox is irrelevant. A formula can only use field
names.
What field is the checkbox bound to? If none, then add one on the Value
tab
of the checkbox's Properties dialog.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
I would like it to go by the time on the computer, but to add an hour to
it.
The "time" listed is what it defaults to when I put in Hour(time). It
will
put it in quotation marks for me.
When I have Now()+Hour(time) by itself it seems to work, I just can't
get
it
to connect to the checkbox.
:
What time? In other words, what is "time" supposed to be?
The first thing you need to know is that a check box can have a value
of
True or False, which are boolean values, but not string values "yes"
or
"no."
Hi!
I'm trying to do an IIF function, but not having much luck. I
currently
have the following formula:
IIf([testcheck]="yes",Now()+Hour("time")&[testcheck]="no"," ")
Basically, I have a checkbox called "testcheck" and I want a time to
show
up
in the "testfield" when checked, but leave it blank if unchecked.
What am I doing wrong??
Thanks for your help in advance!