I am working on an update query that is not working correctly.
I am working with a table that contains 28 fields that can contain the value "Major" or "Minor" or "Major & Minor".
They are error fields that come from a linked Sharepoint table.
I have 3 criteria fields, which are:
Status = “Completed” or “Rejected” Or “Reject”
Overall status = ‘major=Major fail” or “minor=minor fail”
And a date calculation that must be btw 0 and 6. (Basically within 6 days of the weekending date).
I have an IIf statement in each of the 28 fields...
IIf([fieldname]="Major" Or [fieldname] = "Minor" Or [fieldname]="Major & Minor",1,0)
with the 1 in each criteria row of the "OR" condition.
So, each field in the query grid has the value 1 one line lower because of the or condition.
Then each row contains “Completed” or “Rejected” Or “Reject” for the status criteria and
‘Major=Major fail” or “Minor=minor fail” for the Overall status criteria.
And the field that contains the "Update message".
My question is....we export the table to excel and examine it...my manager says not all the rows are being updated...
since there are so many fields in the OR statement....am I better off breaking it into single queries and just run them via a macro? Does it sound like my approach is correct?
thanks for the feedback, so sick of looking at this query.
_______________________________________________________________________________________________________________________
status overall status date field1 field 2 field3 field 4......
“Completed” or “Rejected” Or “Reject”
I am working with a table that contains 28 fields that can contain the value "Major" or "Minor" or "Major & Minor".
They are error fields that come from a linked Sharepoint table.
I have 3 criteria fields, which are:
Status = “Completed” or “Rejected” Or “Reject”
Overall status = ‘major=Major fail” or “minor=minor fail”
And a date calculation that must be btw 0 and 6. (Basically within 6 days of the weekending date).
I have an IIf statement in each of the 28 fields...
IIf([fieldname]="Major" Or [fieldname] = "Minor" Or [fieldname]="Major & Minor",1,0)
with the 1 in each criteria row of the "OR" condition.
So, each field in the query grid has the value 1 one line lower because of the or condition.
Then each row contains “Completed” or “Rejected” Or “Reject” for the status criteria and
‘Major=Major fail” or “Minor=minor fail” for the Overall status criteria.
And the field that contains the "Update message".
My question is....we export the table to excel and examine it...my manager says not all the rows are being updated...
since there are so many fields in the OR statement....am I better off breaking it into single queries and just run them via a macro? Does it sound like my approach is correct?
thanks for the feedback, so sick of looking at this query.
_______________________________________________________________________________________________________________________
status overall status date field1 field 2 field3 field 4......
“Completed” or “Rejected” Or “Reject”