I have a form that allows a user to select a time from a combo box for scheduling a report. I keep getting a runtime error 13 type mismatch on the line in red below. What am I doing wrong? Any help is greatly appreciated.
Code:
Dim strHour As Integer
Dim strAmPm As String
Dim strSQL As String
Set db = CurrentDb
'dtCurDay = Weekday(Date)
If CheckSchedule = -1 Then
strHour = Nz(DLookup("[HOUR]", "Tbl_Schedule_Times", "[TIME] = '" & cmb_Time & "'"), 0)
strAmPm = Nz(DLookup("[AM_PM]", "Tbl_Schedule_Times", "[TIME] = '" & cmb_Time & "'"), "AM")
strTime = "#" & strHour & ":00:00 " & strAmPm & "#"
[COLOR=red]dtrunreport = Format(strTime, "hh:mm")[/COLOR]
dtCurTime = Format(Time(), "hh:mm")