M
Mike Thomas
In Access 2000 after having used this construct for a couple of years, I am
suddenly getting the error message "Runtime error 13 - Type Mismatch" on
line 5 below.
I have the same libraries checked as before -
Visual Basic for Applications
Microsoft Access 9.0 Object Librayy
Microsoft Excel 9.0 Object Library
Microsoft DAO 3.6 Object Library
I don't use this construct anymore, I've switched to qdf.parameters(0) =
"xxx", and it is working ok, but if I don't find the cause I will have to
change many such snippets throughout the app.
Does anyone know what might be causing this?
Many thanks,
Mike Thomas
1 Dim prm As Parameter
2 Dim qdf As QueryDef
3 Set qdf = CurrentDb.QueryDefs("EditComments")
4 intI = 1
5 For Each prm In qdf.Parameters
6 If intI = 1 Then
7 prm.Value = Me.txt_Date
8 Else
' prm.Value = lngResbonsibility
9 End If
10 intI = intI + 1
11 Next prm
12 qdf.Execute
suddenly getting the error message "Runtime error 13 - Type Mismatch" on
line 5 below.
I have the same libraries checked as before -
Visual Basic for Applications
Microsoft Access 9.0 Object Librayy
Microsoft Excel 9.0 Object Library
Microsoft DAO 3.6 Object Library
I don't use this construct anymore, I've switched to qdf.parameters(0) =
"xxx", and it is working ok, but if I don't find the cause I will have to
change many such snippets throughout the app.
Does anyone know what might be causing this?
Many thanks,
Mike Thomas
1 Dim prm As Parameter
2 Dim qdf As QueryDef
3 Set qdf = CurrentDb.QueryDefs("EditComments")
4 intI = 1
5 For Each prm In qdf.Parameters
6 If intI = 1 Then
7 prm.Value = Me.txt_Date
8 Else
' prm.Value = lngResbonsibility
9 End If
10 intI = intI + 1
11 Next prm
12 qdf.Execute