hey
i'm currently trying to get a report to show other items with the same job number in a field. this code worked in access 03 but when i upgraded and converted the database it now doesnt work. i keep getting runtime error 13, type mismatch. the main problem is that i didnt write the original code but im stuck trying to fix it.
here is my code:
Public Function find_others(JobID As Long) As String
Dim db As Database, rs As Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("SELECT [CalibrationNumber] FROM [Calibrations] WHERE CalibrationJobID = " & JobID)
find_others = ""
With rs
While Not .EOF
find_others = find_others & "C" & ![CalibrationNumber] & ", "
.MoveNext
Wend
End With
End Function
Any help would be hugely appreciated.
thanks