IIF Function

G

Guest

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!
 
S

Sue Mosher [MVP-Outlook]

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."
 
G

Guest

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.

Sue Mosher said:
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."

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Toby0924 said:
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!
 
S

Sue Mosher [MVP-Outlook]

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



Toby0924 said:
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.

Sue Mosher said:
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."

Toby0924 said:
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!
 
G

Guest

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



Toby0924 said:
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.

Sue Mosher said:
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!
 
S

Sue Mosher [MVP-Outlook]

This doesn't make any sense, because one field cannot be bound to another:
I have a checkbox field called "testcheck" and it is bound to a text field
called "testfield".

You have a check box control. On its Properties dialog, at the top of the
Value tab, what is the name of the Yes/No field that the check box control
is bound to? That is the field name you need to use in your formula (and you
might want to post your latest version).
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Toby0924 said:
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



Toby0924 said:
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!
 
G

Guest

I have a checkbox bound to a textfield so that they are connected. Is this
not the correct procedure when using checkboxes?


Sue Mosher said:
This doesn't make any sense, because one field cannot be bound to another:
I have a checkbox field called "testcheck" and it is bound to a text field
called "testfield".

You have a check box control. On its Properties dialog, at the top of the
Value tab, what is the name of the Yes/No field that the check box control
is bound to? That is the field name you need to use in your formula (and you
might want to post your latest version).
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Toby0924 said:
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!
 
S

Sue Mosher [MVP-Outlook]

No, that's not the correct procedure. A check box can have two values --
On/Off, Yes/No, True/False. Therefore, it should be bound to a Yes/No field.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Toby0924 said:
I have a checkbox bound to a textfield so that they are connected. Is this
not the correct procedure when using checkboxes?


Sue Mosher said:
This doesn't make any sense, because one field cannot be bound to
another:
I have a checkbox field called "testcheck" and it is bound to a text
field
called "testfield".

You have a check box control. On its Properties dialog, at the top of the
Value tab, what is the name of the Yes/No field that the check box
control
is bound to? That is the field name you need to use in your formula (and
you
might want to post your latest version).
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Toby0924 said:
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!


:

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!
 
G

Guest

Thank you for your time on this Sue.

Can you offer a suggestion where I can find more information on this? Would
your book answer these questions for me?

Basically I just need a time to show up in a field when a checkbox is checked.

Thanks again for your help.

Sue Mosher said:
No, that's not the correct procedure. A check box can have two values --
On/Off, Yes/No, True/False. Therefore, it should be bound to a Yes/No field.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Toby0924 said:
I have a checkbox bound to a textfield so that they are connected. Is this
not the correct procedure when using checkboxes?


Sue Mosher said:
This doesn't make any sense, because one field cannot be bound to
another:

I have a checkbox field called "testcheck" and it is bound to a text
field
called "testfield".

You have a check box control. On its Properties dialog, at the top of the
Value tab, what is the name of the Yes/No field that the check box
control
is bound to? That is the field name you need to use in your formula (and
you
might want to post your latest version).
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



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!


:

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!
 
S

Sue Mosher [MVP-Outlook]

I've written about formulas both in my book and in various articles (see
http://www.outlookcode.com/d/forms.htm#formulas

Did you change the field that the check box is bound to yet so that it's a
Yes/No field?
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Toby0924 said:
Thank you for your time on this Sue.

Can you offer a suggestion where I can find more information on this?
Would
your book answer these questions for me?

Basically I just need a time to show up in a field when a checkbox is
checked.

Thanks again for your help.

Sue Mosher said:
No, that's not the correct procedure. A check box can have two values --
On/Off, Yes/No, True/False. Therefore, it should be bound to a Yes/No
field.

Toby0924 said:
I have a checkbox bound to a textfield so that they are connected. Is
this
not the correct procedure when using checkboxes?


:

This doesn't make any sense, because one field cannot be bound to
another:

I have a checkbox field called "testcheck" and it is bound to a text
field
called "testfield".

You have a check box control. On its Properties dialog, at the top of
the
Value tab, what is the name of the Yes/No field that the check box
control
is bound to? That is the field name you need to use in your formula
(and
you
might want to post your latest version).

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!


:

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.

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!
 
G

Guest

Thank you for the article Sue, I will look into these options.

And yes, I have changed the field that the check box is bound to, to a
yes/no field. I then added a text field that will show the time when the
check box is checked. I just need to figure out how to connect the two now.


Sue Mosher said:
I've written about formulas both in my book and in various articles (see
http://www.outlookcode.com/d/forms.htm#formulas

Did you change the field that the check box is bound to yet so that it's a
Yes/No field?
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Toby0924 said:
Thank you for your time on this Sue.

Can you offer a suggestion where I can find more information on this?
Would
your book answer these questions for me?

Basically I just need a time to show up in a field when a checkbox is
checked.

Thanks again for your help.

Sue Mosher said:
No, that's not the correct procedure. A check box can have two values --
On/Off, Yes/No, True/False. Therefore, it should be bound to a Yes/No
field.

I have a checkbox bound to a textfield so that they are connected. Is
this
not the correct procedure when using checkboxes?


:

This doesn't make any sense, because one field cannot be bound to
another:

I have a checkbox field called "testcheck" and it is bound to a text
field
called "testfield".

You have a check box control. On its Properties dialog, at the top of
the
Value tab, what is the name of the Yes/No field that the check box
control
is bound to? That is the field name you need to use in your formula
(and
you
might want to post your latest version).

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!


:

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.

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!
 
S

Sue Mosher [MVP-Outlook]

Your original formula was on the right track:

IIf([testcheck]="yes",Now()+Hour("time")&[testcheck]="no"," ")

The first argument is your test condition. It should be:

[name_of_your_field] = True

The second argument is what you want to appear when the check box is
checked. I think that's probably

Time()

or some variation. The third argument is correct as-is.

This of course is the formula for the text box field, not the check box
field.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Toby0924 said:
Thank you for the article Sue, I will look into these options.

And yes, I have changed the field that the check box is bound to, to a
yes/no field. I then added a text field that will show the time when the
check box is checked. I just need to figure out how to connect the two
now.


Sue Mosher said:
I've written about formulas both in my book and in various articles (see
http://www.outlookcode.com/d/forms.htm#formulas

Did you change the field that the check box is bound to yet so that it's
a
Yes/No field?
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Toby0924 said:
Thank you for your time on this Sue.

Can you offer a suggestion where I can find more information on this?
Would
your book answer these questions for me?

Basically I just need a time to show up in a field when a checkbox is
checked.

Thanks again for your help.

:

No, that's not the correct procedure. A check box can have two
values --
On/Off, Yes/No, True/False. Therefore, it should be bound to a Yes/No
field.
I have a checkbox bound to a textfield so that they are connected.
Is
this
not the correct procedure when using checkboxes?


:

This doesn't make any sense, because one field cannot be bound to
another:

I have a checkbox field called "testcheck" and it is bound to a
text
field
called "testfield".

You have a check box control. On its Properties dialog, at the top
of
the
Value tab, what is the name of the Yes/No field that the check box
control
is bound to? That is the field name you need to use in your formula
(and
you
might want to post your latest version).

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!


:

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.

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."

message
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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top