Saturday, January 14, 2017

Delete query for last record in the table


Sometimes you would like to format a table for reporting purposes.

The last row would usually be the sum of all the above records.

To delete the last row and append a new sum, you can use this query.

DoCmd.RunSQL "" & _
"Delete [PPE c].ID" & _
" FROM [PPE c]" & _
" WHERE ((([PPE c].ID)=DMax(""[ID]"",""[PPE C]"")));"

No comments:

Post a Comment