Hallo Access-Gemeinde
Bitte helft mir auf die Sprünge!
Ich habe deine geteilte DB mit 4 Backend die ich mit einem VBA verknüpfe.
Jetzt will ich diese DB auf Access 2010 umstellen, und habe ein Problem bei einem VBA.
Es funktioniert beim 2003 aber nicht beim 2010.
Private Sub Bild40_Click()
Dim db As DAO.Database
Dim strDatenAlt As String
Dim strDaten As String
Dim passw As String
Dim i As Integer
Dim td As DAO.TableDef
Set db = CurrentDb()
passw = "egal"
strDaten = "D:\Datenbank\Daten\DB1.mdb"
For Each td In CurrentDb.TableDefs
If (td.Attributes And dbAttachedTable) = dbAttachedTable Then
strDatenAlt = Mid(td.Connect, InStr(td.Connect, "DATABASE=") + 9)
If InStr(strDatenAlt, ";") Then
strDatenAlt = Left(strDatenAlt, InStr(strDatenAlt, ";") - 1)
End If
If strDatenAlt <> strDaten Then
td.Connect = "MS Access;PWD=" & passw & _
";DATABASE=" & strDaten
td.RefreshLink
End If
End If
Next td
End Sub
Der Fehler liegt im >dbAttachedTable< , dass im Access 2010 bei mir nicht in der Bibliothek gefunden wurde.
Bitte um Hilfe
Danke Ernst
Fehler gefunden
Module - Extra - Verweise - NICHT VORHANDEN: Microsoft DAO 2.5/3.5...
war das Häckchen gesetzt.
Jetzt Funkt es
Trotzdem Danke
Ernst