My years in accounts payable and procurement wouldn't let me get past this. So I had to change it. Nothing wrong with the queries, they all worked as designed. You wouldn't write off a Quote, you would either close it or give it an expiration date. But, you would write off an unpaid invoice after a certain amount of time.
I changed the CustomerOrderWriteoffQ to be a select query (OrderWriteoffQ)as follows: CustomerT and OrderT ToBeArchived=True ALIAS field NoteUpdate: IIf([IsQuotation],"Quote Expired " & Date() & " Quote #: " & [OrderID] & " - " & [Notes],"Order Writeoff " & Date() & " Order #: " & [OrderID] & " - " & [Notes]) ALIAS Field DescripUpdate: IIf([IsQuotation],"Quote Expired " & [Description],"Order Writeoff " & [Description])
New Update query CustomerT and OrderT and OrderWriteoffQ Need to join CustomerID's and OrderID's The joins limit the updates made to only those that pertain to the specific order instead of all ToBeArchived orders getting all updates Notes UpdateCustomerT Update Notes to[NoteUpdate]
Similar changes made for the AppendOrderWriteoffQ query I changed the Expr2: Field to this for the Notes Append NotesUpdate: IIf([IsQuotation],"Quote Expired " & " Quote #: " & [OrderID],"Order Writeoff " & " Order #: " & [OrderID])
UpdateOrderWriteoffQ OrderT and OrderWriteoffQ Update Description to [DescripUpdate]
End result of the changes made to queries in 17.1 and 17.3 now updates the notes for quotes older than 90 days to Quote Expired and invoices over a year old and not paid to Writeoff,
Also, since the date in the contact table is a date/time entry I changed the append from a Date() to Now() to enter the time as well.
I wouldn't have had a clue how to do this 2 months ago before I started taking these lessons. Thank You!!
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access Expert 17.