Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Type Mismatch Using Access 2000 with Access 2002-created file

Status
Not open for further replies.

zakharin

Programmer
Jan 16, 2003
2
US
I write VBA programs for someone who has Access 2000. I, on the other hand, had a crash on the computer I was using with Access 2000 and continued coding in Access 2002, keeping the format as Access 2000. Well, as it turns out, something is wrong when trying to open the file with Access 2000.

To begin with, if I just open my form and click on any buttons, nothing happens. If I open my code in VBA and compile it, then open the form and click on a button again, I get the error.

The following line, which was always perfectly fine before, is suddenly causing a "type mismatch" at runtime:

toMatrix Format$(txtFile.Value), "tmpNames", strquery, Me, optID.Value

where strquery is dimensioned as string. The function itself is declared thus (in a module rather than in the same form):

Sub toMatrix(fileName As String, src As String, query As String, frm As Form, srcName As Integer)

When I attempt to take an earlier version of the file which works fine in 2000 and paste any code from it, even unrelated to either the sub where the line is or the function toMatrix, the error comes back.

Can somebody help me with this?

Thanks,
Boris Zakharin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top