T
truleuneek
I'm running Access 2003.
I have a working database. It seems as if the database is in Access
2000 format, because when I go to Convert, the 'Convert to Access 2000'
option is grayed out.
I need to convert this database to both Access 2002-2003 and Access 97.
I have this part of VB code, and it works fine in the current version,
as well as in Access 2002-2003 (after converting to Access 2002-2003).
Dim rstRoutes As Recordset
Dim strSQL As String
......
strSQL = "SELECT DISTINCT [Route] " & _
"FROM Highways_Info " & _
"WHERE Highways_Info.District = " & DistrictBox.Value
Set rstRoutes = CurrentDb.OpenRecordset(strSQL, dbOpenDynaset)
......
However, after converting from 2000 to 97, the code generates a
run-time error '13' : Type Mismatch. The last line, where I try to
open the recordset is where it crashes.
DistrictBox is a combo box from a form. It contains a numerical value.
The form is open, and when debugging, DistrictBox.Value does have a
valid value.
No changes were made in the two databases, other than the conversion
from Access 2000 to 97, using Access' built-in tool. It seems as if
the problem lies with Access, not my code.
Can anyone help?
I have a working database. It seems as if the database is in Access
2000 format, because when I go to Convert, the 'Convert to Access 2000'
option is grayed out.
I need to convert this database to both Access 2002-2003 and Access 97.
I have this part of VB code, and it works fine in the current version,
as well as in Access 2002-2003 (after converting to Access 2002-2003).
Dim rstRoutes As Recordset
Dim strSQL As String
......
strSQL = "SELECT DISTINCT [Route] " & _
"FROM Highways_Info " & _
"WHERE Highways_Info.District = " & DistrictBox.Value
Set rstRoutes = CurrentDb.OpenRecordset(strSQL, dbOpenDynaset)
......
However, after converting from 2000 to 97, the code generates a
run-time error '13' : Type Mismatch. The last line, where I try to
open the recordset is where it crashes.
DistrictBox is a combo box from a form. It contains a numerical value.
The form is open, and when debugging, DistrictBox.Value does have a
valid value.
No changes were made in the two databases, other than the conversion
from Access 2000 to 97, using Access' built-in tool. It seems as if
the problem lies with Access, not my code.
Can anyone help?