The SQL below is returning a type mismatch error and I cannot figure out why.
The ID field in RANDOM_RECORD is a number field. Any one have any idea as to why i am getting the error?
Dim stRecordTotal As String
Dim stRecordResult as String
Dim stRecord As String
stRecordTotal = 0
stRecordResult = 0
stRecordTotal = "SELECT Count(RANDOM_RECORDS.ID) " & _
"FROM RANDOM_RECORDS "
stRecordResult = (stRecordTotal / 4)
stRecord = "INSERT INTO RESULTS ( stRecordResult) "
DoCmd.RunSQL stRecord