Anbei mein Code für die Connection:
Set db = New ADODB.Connection
Set rs = New ADODB.Recordset
With CommonDialog1
.DialogTitle = "Wählen Sie die Datenbank aus!"
.CancelError = True
.Filter = "Jet Datenbank (*.mdb)|*.mdb"
.ShowOpen
strg_dateiname = .FileName
End With
With db
.Provider = "Microsoft Jet 4.0 OLE DB Provider"
.ConnectionString = "Data Source=" & strg_dateiname
.Open
End With
With rs
.ActiveConnection = db
.CursorLocation = adUseClient
.LockType = adLockBatchOptimistic
.CursorType = adOpenKeyset
.Source = "SELECT * FROM Tabelle1"
.Open
End With
und für die Sortierung:
rs.Sort = "Feld14 asc"
rs.UpdateBatch
rs.Close
db.Close
Set rs = Nothing
Set db = Nothing
Für Eure Hilfe wäre ich sehr dankbar.
MfG Markus