Runtime-Error 13 Type mismatch

  • Thread starter Thread starter jack-geronimo
  • Start date Start date
J

jack-geronimo

I have programmed an VBA Project(adp-File), which runs fine since two
years.

But after the change of the Connection-String the Application always
runs into an runtime-error 13: Type mismatch when I call the following
Sub.

Call aktuell_von_record(Me, objRS)

Sub aktuell_von_record(ByRef frm As Form, ByVal objRS As Recordset)
frm.lb_recordpos.Caption = "Datensatz " & objRS.AbsolutePosition &
" von " & objRS.RecordCount & " wird angezeigt"
End Sub

But this error only appears on few Computers... on other Plattforms
with the same Configuration (Windows2000 and Access 2002) it works
fine.

ARGH!!!

....please help...

greetinx
jack-geronimo
 
But after the change of the Connection-String the Application always
runs into an runtime-error 13: Type mismatch when I call the following
Sub.

Check the References (Tools... References with the VBA editor open) on
the computers that give this error. The "Microsoft ActiveX Data
Objects" reference should be unchecked, and the "Microsoft DAO x.xx
Object Library" should be checked; by default, A2000 and later have
these checked and unchecked instead.
 
John Vinson said:
Check the References (Tools... References with the VBA editor open) on
the computers that give this error. The "Microsoft ActiveX Data
Objects" reference should be unchecked, and the "Microsoft DAO x.xx
Object Library" should be checked; by default, A2000 and later have
these checked and unchecked instead.

Call me overly cautious, but even if the references are correct, I'd advise
using

Sub aktuell_von_record(ByRef frm As Form, ByVal objRS As DAO.Recordset)
 
Call me overly cautious, but even if the references are correct, I'd advise
using

Sub aktuell_von_record(ByRef frm As Form, ByVal objRS As DAO.Recordset)

Right you are!
 
Hey John, hey Douglas

thanx for your advice, but John wroteObject Library" should be checked; by default, A2000 and later have these checked and unchecked instead....<

I thought that the Access Project (.adp) only based on the ADO Library for the Datalayer and all Recordsets ar
ADO-Recordsets. I have a reference to the "Microsoft ActiveX Data Objects 2.5 Library" and the "Microsoft DAO x.xx´Object Library" is unchecked, because it is an Access2002 Project connected to a SQL-Server 2000
This settings are working fine on the most computers
As well as the advice from Douglas J. refers to the same issue, that I think the recordset is not the problem I think there is a problem with the delivery of the Form to the sub...

greetin
jack-geronimo
 
Back
Top