Dear all,
I have a wierd problem. I developed an App in 2003 and converted to 2007. when I try to open a form, I get a Type Mismatch error. I debugged and found it was on the following statement;
Set rst = db.OpenRecordset("18_SvrTns")
"18_SvrTns" is my server transaction table. can you not use this code in 2007 since the app works perfectly in 2003?
The preceeding code is:
Private Sub S_CpStat_GotFocus()
On Error GoTo Err_Reorder_Message
' CPU Cores Reorder Message
Dim db As Database
Dim rst As Recordset
Dim T_CoreTot As Double
Dim T_CoreCalc As Double
Dim T_CoreRe As Double
Dim T_MemTot As Double
Dim T_MemCalc As Double
Dim T_MemRe As Double
' Check Transactoin File and Add up all related Records to get the utilization
Set db = CurrentDb()
Set rst = db.OpenRecordset("18_SvrTns")
If Not rst.EOF Then
rst.MoveFirst ' Set Cursor to 1st record
Me.SubCoreTot = 0
Me.SubMemTot = 0
End If
Do While Not rst.EOF
If [Forms]![Frm_SvrInq].[Form]![S_SerialNum] = rst![S_SerialNum] Then
Me.SubCoreTot = Me.SubCoreTot + rst![L_CoreAlloc]
Me.SubMemTot = Me.SubMemTot + rst![S_MemAlloc]
End If
rst.MoveNext
Loop
I have a wierd problem. I developed an App in 2003 and converted to 2007. when I try to open a form, I get a Type Mismatch error. I debugged and found it was on the following statement;
Set rst = db.OpenRecordset("18_SvrTns")
"18_SvrTns" is my server transaction table. can you not use this code in 2007 since the app works perfectly in 2003?
The preceeding code is:
Private Sub S_CpStat_GotFocus()
On Error GoTo Err_Reorder_Message
' CPU Cores Reorder Message
Dim db As Database
Dim rst As Recordset
Dim T_CoreTot As Double
Dim T_CoreCalc As Double
Dim T_CoreRe As Double
Dim T_MemTot As Double
Dim T_MemCalc As Double
Dim T_MemRe As Double
' Check Transactoin File and Add up all related Records to get the utilization
Set db = CurrentDb()
Set rst = db.OpenRecordset("18_SvrTns")
If Not rst.EOF Then
rst.MoveFirst ' Set Cursor to 1st record
Me.SubCoreTot = 0
Me.SubMemTot = 0
End If
Do While Not rst.EOF
If [Forms]![Frm_SvrInq].[Form]![S_SerialNum] = rst![S_SerialNum] Then
Me.SubCoreTot = Me.SubCoreTot + rst![L_CoreAlloc]
Me.SubMemTot = Me.SubMemTot + rst![S_MemAlloc]
End If
rst.MoveNext
Loop