Hi,

want to access from visio 2002 vba to an msaccess97 db

my code looks as follows:

Private Sub syncS()
' On Error GoTo Err_Handler
Dim rs As New ADODB.Recordset '
Dim strsql As String
Set DBConnect = New ADODB.Connection

With DBConnect
.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
"Dbq=C:\db00.mdb;" & _
"Uid=admin;" & _
"Pwd="
End With
strsql = "select a.assettag, a.barcode, a.lastid, p.dassignment, p.fv_betriebsysstem, fv_cluster_server, fv_cpu_prozessortyp_speed " & _
"from amAsset A, " & _
" amPortfolio P, " & _
" amModel M, " & _
" amComputer C, " & _
" amLocation L, " & _
" amBrand b " & _
" where a.lastid = p.lastid and " & _
" p.lmodelid = m.lmodelid and " & _
" p.llocid = l.llocid and " & _
" a.liconid = c.liconid and " & _
" b.lbrandid = m.lbrandid; "

' rs.Open strsql, DBConnect, , adLockReadOnly throws error , too


Set rs = DBConnect.Execute(strsql)
Do While Not rs.EOF
MsgBox ("AssetTag:") & "" & rs!Assettag & ""
Loop


End Sub

both versions are throughing
msaccess driver 4 parameters expected, but a lesser number passed
MSAccess Treiber 4 Parameter erwartet, aber es wurden zu wenig parameter übergeben

Thanks in advance