H
Hotshots
Hi! I'm really locked up with this. Here's my situation---
I have two tables tbl1 and tbl2 (one to many) related by the field
"myID".
I have a Yes / No field in each table named Executed on the tbl1 and
Completed on the tbl2.
What i want is " when thru another form 'Form1' i run a update for the
'myID' (i use a text box named 'myID' and a command button named
'Update'), i want to check if the 'Completed' in tbl2 is true for ALL
Records; if So then update in tbl1 and set Executed to True.
The Problem i face here is " HOW TO CHECK FOR A VALUE ON ALL RECORDS
FILTERED BY A CRITERIA" .
If i use the following code even if one of the records has completed
true it sets the executed to true.for all records rather than the
specified myID that i want.
"UPDATE tbl1 INNER JOIN tbl2 ON tbl1.myID = tbl2.myID" & _
" SET tbl1.Executed = True" & _
" WHERE tbl2.completed = True"
I would really appreciate any help as i face similar problems on few
more of my tables.
Thanks in Advance
I have two tables tbl1 and tbl2 (one to many) related by the field
"myID".
I have a Yes / No field in each table named Executed on the tbl1 and
Completed on the tbl2.
What i want is " when thru another form 'Form1' i run a update for the
'myID' (i use a text box named 'myID' and a command button named
'Update'), i want to check if the 'Completed' in tbl2 is true for ALL
Records; if So then update in tbl1 and set Executed to True.
The Problem i face here is " HOW TO CHECK FOR A VALUE ON ALL RECORDS
FILTERED BY A CRITERIA" .
If i use the following code even if one of the records has completed
true it sets the executed to true.for all records rather than the
specified myID that i want.
"UPDATE tbl1 INNER JOIN tbl2 ON tbl1.myID = tbl2.myID" & _
" SET tbl1.Executed = True" & _
" WHERE tbl2.completed = True"
I would really appreciate any help as i face similar problems on few
more of my tables.
Thanks in Advance