I have a system that I enter my days work then at the weeks end it generates the invoice for the week with each days work in it. I then want to create a form that registers all those days worked for that inovoice as sent. The problem is when I build the query and group the days worked I am unable to tick the invoice as sent as you cannot update grouped recordsets. I am very beginner at this whole thing but was hoping that someone had a vba work around that does not involve making new tables. I have inserted the sql statement for my query below if it helps.
Regards Kris
Code:
SELECT TblTIDetails.BusinessName, TblTIDetails.InvoiceNumber, Max(TblTIDetails.JobDate) AS MaxOfJobDate, Sum(TblTIDetails.SubTotal) AS SumOfSubTotal, Sum(TblTIDetails.GST) AS SumOfGST, Sum(TblTIDetails.Total) AS SumOfTotal, TblTIDetails.[Payment Terms], TblTIDetails.InvoiceSent, Format(Date(),"ww")-Format([JobDate],"ww") AS WeeksPassed, TblTIDetails.DateInvoiced FROM tblPayLevels INNER JOIN TblTIDetails ON tblPayLevels.JobType = TblTIDetails.JobType GROUP BY TblTIDetails.BusinessName, TblTIDetails.InvoiceNumber, TblTIDetails.[Payment Terms], TblTIDetails.InvoiceSent, Format(Date(),"ww")-Format([JobDate],"ww"), TblTIDetails.DateInvoiced HAVING (((TblTIDetails.InvoiceNumber)<>0) AND ((TblTIDetails.InvoiceSent)=False)) ORDER BY TblTIDetails.BusinessName, Max(TblTIDetails.JobDate);
Regards Kris