This question was asked before, but not really answered. I have a search that returns columns dynamically created so I don't know the specific column/field names to include, but I do know the columns/fields that I need to remove so the graph will total and display properly. Is there a way to remove those columns?
Filed Name: AttendanceDate
Dim curDatabase As DAO.Database
Dim tblPersons As DAO.TableDef
Set curDatabase = CurrentDb
Set TempDay = curDatabase.TableDefs("TempDay")
DoCmd.RunSQL "ALTER TABLE TempDay DROP COLUMN AttendanceDate"
‘For deleting more than one column try below
DoCmd.RunSQL "ALTER TABLE TempDay DROP COLUMN Second Column Name"
DoCmd.RunSQL "ALTER TABLE TempDay DROP COLUMN Third Column Name"