V
vc-programmer
hello all,
I have a table "mytable", from which "date1" holds a date and "label" can
contain 2 different text values ( day "one" and "two" ), and a field "result"
which can hold a date.
what I want to do, but not sure if I can is to use a condition to execute
either of two update queries which is logically:
IIf( mytable.label="one", <update = date1>, <update = 04/01/08>)
my update queries work fine when used individually, but not when I both it
in the conditional IIf. the update queries are :
UPDATE [mytable] SET [mytable].[result] = [mytable].[date1]
WHERE ((([mytable].label)="one"));
and
UPDATE [mytable] SET [mytable].[result] = #04/01/08#
WHERE ((([mytable].label)="two"));
not sure what i am doing wrong.
thanks.
I have a table "mytable", from which "date1" holds a date and "label" can
contain 2 different text values ( day "one" and "two" ), and a field "result"
which can hold a date.
what I want to do, but not sure if I can is to use a condition to execute
either of two update queries which is logically:
IIf( mytable.label="one", <update = date1>, <update = 04/01/08>)
my update queries work fine when used individually, but not when I both it
in the conditional IIf. the update queries are :
UPDATE [mytable] SET [mytable].[result] = [mytable].[date1]
WHERE ((([mytable].label)="one"));
and
UPDATE [mytable] SET [mytable].[result] = #04/01/08#
WHERE ((([mytable].label)="two"));
not sure what i am doing wrong.
thanks.