Check box update in query

  • Thread starter Thread starter guidop12
  • Start date Start date
G

guidop12

ANy help would be appreciated. I'm trying to set up a query to update a check
box in a master table. Below I typed the way I want the check box to be
updated, which I know isn't the right syntax but it gives you an idea of what
I want.

My query has three tables (header, header1, electric_water master) that have
all the fields mentioned below in it. Also I have it set up as an update
query. So I guess I'm looking for the right syntax to go into the criteria.

IIF( [header.name_line] AND [header.line1] = [header1.name_line] AND
[header1.line1] THEN [electric_water master.match] = 1,
IIF [header.name_line] AND [header.line1] NOT = [header1.name_line] AND
[header1.line1] THEN [electric_water master.match] = 0)


Thanks in advance for all your help
 
BACKUP Database! BACKUP Database!
Use this in the 'Update To' row of the grid under [electric_water
master].[match]
IIF( [header].[name_line] = [header1].[name_line] AND [header].[line1] =
[header1].[line1], - 1, 0)
 
Thank you, that worked great.

KARL DEWEY said:
BACKUP Database! BACKUP Database!
Use this in the 'Update To' row of the grid under [electric_water
master].[match]
IIF( [header].[name_line] = [header1].[name_line] AND [header].[line1] =
[header1].[line1], - 1, 0)

--
KARL DEWEY
Build a little - Test a little


guidop12 said:
ANy help would be appreciated. I'm trying to set up a query to update a check
box in a master table. Below I typed the way I want the check box to be
updated, which I know isn't the right syntax but it gives you an idea of what
I want.

My query has three tables (header, header1, electric_water master) that have
all the fields mentioned below in it. Also I have it set up as an update
query. So I guess I'm looking for the right syntax to go into the criteria.

IIF( [header.name_line] AND [header.line1] = [header1.name_line] AND
[header1.line1] THEN [electric_water master.match] = 1,
IIF [header.name_line] AND [header.line1] NOT = [header1.name_line] AND
[header1.line1] THEN [electric_water master.match] = 0)


Thanks in advance for all your help
 
Back
Top