Link to home
Start Free TrialLog in
Avatar of stephen81
stephen81Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Delete Records Button Disabled

I have a database with a continuous form listing my records. Unfortunately I seem to be unable to delete records from within this form even though 'Allow Deletions' is set to 'Yes'. The delete record button on the toolbar is greyed out and if I select a record and hit the delete key, I get a message in the status bar saying 'Records not deleted. Data is read-only'.

Does anyone have any idea why this might be?

Avatar of stevbe
stevbe

Is the form bound to a query? Check to see if your SQL is updateable, or the query's recordset type property is set to Snapshot

Steve
Avatar of stephen81

ASKER

My form is bound to a select query. Where do I find out if my SQL is updateable or if the recordset type property is set to Snapshot?
I've just found how to check the recordset property for my form and it is set to Dynaset.
right click in the top section of your query and select properties. If this is set to Dynaset please post the SQL. You may be asking SQL to do something where it cannot figure which table to update or how to enforcfe referential integrity.

Steve
I hope you can follow this! BTW I have got my tables set up with referential integrity.

SELECT [FINAL ONWARDS].ID, [FINAL ONWARDS].Name, [FINAL ONWARDS].[Claim Number], [FINAL ONWARDS].[Invoice Number], [FINAL ONWARDS].Amount, [FINAL ONWARDS].Date, [FINAL ONWARDS].[Current Status], [FINAL ONWARDS].[Next Stage], [FINAL ONWARDS].[Date Last Worked], [FINAL ONWARDS].[Outstanding Amount], [FINAL ONWARDS].[Installments?], [FINAL ONWARDS].[Check Required?], [FINAL ONWARDS].[Complete?], [FINAL ONWARDS].[Date Next Check Due], [FINAL ONWARDS].[Suspended?]
FROM [FINAL ONWARDS]
GROUP BY [FINAL ONWARDS].ID, [FINAL ONWARDS].Name, [FINAL ONWARDS].[Claim Number], [FINAL ONWARDS].[Invoice Number], [FINAL ONWARDS].Amount, [FINAL ONWARDS].Date, [FINAL ONWARDS].[Current Status], [FINAL ONWARDS].[Next Stage], [FINAL ONWARDS].[Date Last Worked], [FINAL ONWARDS].[Outstanding Amount], [FINAL ONWARDS].[Installments?], [FINAL ONWARDS].[Check Required?], [FINAL ONWARDS].[Complete?], [FINAL ONWARDS].[Date Next Check Due], [FINAL ONWARDS].[Suspended?], IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))
HAVING ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null)) OR ((([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Claim_Number]) Is Null)) OR ((([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Claim_Number]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Invoice_Number]) Is Null)) OR ((([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null)) OR ((([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![From]) Is Null)) OR ((([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![From]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![From]) Is Null)) OR ((([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![From]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![From]) Is Null)) OR ((([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![From]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![From]) Is Null)) OR ((([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![From]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Status]) Is Null)) OR ((([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Status]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Status]) Is Null)) OR ((([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Status]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![Status]) Is Null)) OR ((([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![Status]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![Status]) Is Null)) OR ((([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![Status]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![From]) Is Null) AND (([Forms]![Search]![Status]) Is Null)) OR ((([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![From]) Is Null) AND (([Forms]![Search]![Status]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![From]) Is Null) AND (([Forms]![Search]![Status]) Is Null)) OR ((([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![From]) Is Null) AND (([Forms]![Search]![Status]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![From]) Is Null) AND (([Forms]![Search]![Status]) Is Null)) OR ((([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![From]) Is Null) AND (([Forms]![Search]![Status]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![From]) Is Null) AND (([Forms]![Search]![Status]) Is Null)) OR ((([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![From]) Is Null) AND (([Forms]![Search]![Status]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![To]) Is Null)) OR ((([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![To]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![To]) Is Null)) OR ((([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![To]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![To]) Is Null)) OR ((([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![To]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![To]) Is Null)) OR ((([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![To]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![To]) Is Null)) OR ((([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![To]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![To]) Is Null)) OR ((([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![To]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![To]) Is Null)) OR ((([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![To]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![To]) Is Null)) OR ((([FINAL ONWARDS].[Suspended?])=[Forms]![Search]![Suspended]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![To]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![From]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![From]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![From]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![From]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![From]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![From]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![From]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![From]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].[Date Last Worked]) Between [Forms]![Search]![From] And [Forms]![Search]![To]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![From]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![From]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![From]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![From]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![From]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![From]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![From]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR (((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![From]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![To]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![To]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![To]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![To]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![To]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![To]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![To]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].[Current Status])=[Forms]![Search]![Status]) AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![To]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![To]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![To]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![To]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].[Invoice Number]) Like "*" & [Forms]![Search]![Invoice_Number] & "*") AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![To]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND (([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![To]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].[Claim Number]) Like "*" & [Forms]![Search]![Claim_Number] & "*") AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![To]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR ((([FINAL ONWARDS].Name) Like "*" & [Forms]![Search]![Name] & "*") AND ((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![To]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null)) OR (((IIf([Forms]![Search]![Complete]=0,[Complete?]="Incomplete",IIf([Forms]![Search]![Complete]=-1,[Complete?]="*" Or [Complete?] Is Null))) Is Not Null) AND (([Forms]![Search]![Name]) Is Null) AND (([Forms]![Search]![Claim_Number]) Is Null) AND (([Forms]![Search]![Invoice_Number]) Is Null) AND (([Forms]![Search]![Status]) Is Null) AND (([Forms]![Search]![To]) Is Null) AND (([Forms]![Search]![Suspended]) Is Null));
ASKER CERTIFIED SOLUTION
Avatar of stevbe
stevbe

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks. I'll try that but I'm going home now so I'll try it tomorrow as it takes me a while to change my query because if I just change part of my select query it then tells me my query is too complex so I have to write all the criteria each time for it to work again. I don't suppose you know why this is do you?
Anyway, I'm going so I'll try again tomorrow and get back to you.
"my query is too complex" ... this is an understatement. You should review what it is the query is actually doing as the HAVING clause is entirely too long to read through. I understand you are building it from a search form, perhaps you could have this query simnply return the PK fileds and use its results to link to a the table you really want to update.

Steve
How would I go about doing that? I have taken the ticks out of my select query so it only returns the primary key, and I have another query which just returns records base on that primary key but when I look at the sql for my main query it is still ridiculously long. Would it be better/possible to write a query for each field that my form is querying on and then bring them all together in another query?

I've managed to get the delete working now though, by taking out the grouped field and setting the recordset to Dynaset (inconsistent updates) instead of just Dynaset, although I don't really understand what the difference is, it does seem to work. Can anyone explain what the inconsistent updates part means?
Inconsistent Updates means that you are telling Access to let any field be edited whether it would violate your implied relationships (the lines between the tables) or not. Typically I set the relationships explicity in the relationships window and then the standard Dynaset takes care of referetial integrity for me.'

If it works for you then there is no real need to "fix" it unless the thought of trying to figure it all out again in the future, when you have to change something, is particularly daunting.

You could write this in code so you can use variables to assign your criteria for each field instead of hardcoding all of the possible combinations.

Steve
Thanks Steve, I think I'll leave it as Inconsistent Updates as it seems to work. I'm interested in how to go about writing my query in code like you said though but I don't really understand how to go about it. I'll give you the points though and post that in another question if you fancy helping me out.


Steve
I would encourage you to post the details of the field/table names and the combinations that you require rather than the entire SQL you have now, perface it with "I am building a Serach Form" list which fields must be filled in and which fields are optional, and note which fields need to be searched with "Like *" rather than the exact value.

Steve
Good tip. thanks