C
Chet.Horton
Guest
I have a table with the follow fields. StudentID, LastName, FirstName, TrainDate. I have windows form that I use to input the date of attendance in the TrainDate field. The TrainDate field is short text. My goal is to count how many TrainDate entries each person has and display it in a datagridview.
This is the query I am working on but I get the following error: "Date type mismatch in criteria expression"
Access.ExecQuery("SELECT FirstName AS [FIRST NAME], LastName AS [LAST NAME],
SUM(TrainDate) AS [TOTAL CLASSES]
FROM ACJATTENDANCE
GROUP BY FirstName, LastName, TrainDate;")
' REPORT & ABORT ON ERRORS
If NoErrors(True) = False Then End
' FILL DATAGRID
dgvAttend.DataSource = Access.DBDT
Can someone help me figure out the reason for the error? I have used this query to calculate wins and losses in another part of the program successfully. I'm not sure but I think this has something to do with TrainDate.
Continue reading...
This is the query I am working on but I get the following error: "Date type mismatch in criteria expression"
Access.ExecQuery("SELECT FirstName AS [FIRST NAME], LastName AS [LAST NAME],
SUM(TrainDate) AS [TOTAL CLASSES]
FROM ACJATTENDANCE
GROUP BY FirstName, LastName, TrainDate;")
' REPORT & ABORT ON ERRORS
If NoErrors(True) = False Then End
' FILL DATAGRID
dgvAttend.DataSource = Access.DBDT
Can someone help me figure out the reason for the error? I have used this query to calculate wins and losses in another part of the program successfully. I'm not sure but I think this has something to do with TrainDate.
Continue reading...