Hi ,
I upgraded an Office 97 application , which doesnt have much information about any connections etc. to MS Office 2010. This is talking to a SQL database with ODBC connection.
All the functions are working, But when i open this, I am getting the error TypeMismatch error 13.
This is because its calling a particular function to reset the displae.
Any idea to fix this/
This is very urgent task that assigned to me and any help is highly appreciated.
Thansk.
BJ
I upgraded an Office 97 application , which doesnt have much information about any connections etc. to MS Office 2010. This is talking to a SQL database with ODBC connection.
All the functions are working, But when i open this, I am getting the error TypeMismatch error 13.
This is because its calling a particular function to reset the displae.
Code:
Public Sub ResetDisplay()
Dim objRst As Recordset
Dim strSQL, strTotalPatients, extract_dt_tm As String
strSQL = "SELECT Count(alias) AS TotalPatients FROM tblSafetyNet WHERE IsNull(Departure_dt_tm)"
Set objRst = CurrentDb.OpenRecordset(strSQL)
Set strTotalPatients = objRst.Fields("TotalPatients")
objRst.Close
strSQL = "SELECT TOP 1 extract_dt_tm FROM tblSafetyNet"
Set objRst = CurrentDb.OpenRecordset(strSQL)
If IsNull(objRst.Fields("extract_dt_tm")) = False And objRst.EOF = False Then
extract_dt_tm = objRst.Fields("extract_dt_tm")
Else
extract_dt_tm = Format(Now(), "dd/mm/yy hh:nn")
End If
objRst.Close
Set objRst = Nothing
lblInfo.Caption = "At " & Format(extract_dt_tm, "d/m hh:nn")
lblPatientCount.Caption = "All Patients (" & strTotalPatients & "/" & strTotalPatients & ")"
cboPatient.Requery
[fsubData].Form.Requery
[fsubDataDisCharge].Form.Requery
End Sub
Any idea to fix this/
This is very urgent task that assigned to me and any help is highly appreciated.
Thansk.
BJ