Private
Sub
UserForm_Initialize()
Dim
db
As
ADODB.Connection
Dim
ds
As
New
ADODB.Recordset
Dim
sqlabfrage
As
String
Set
db = CurrentProject.Connection
sqlabfrage =
"SELECT es, de"
sqlabfrage = sqlabfrage +
" FROM tab_woerterbuch"
sqlabfrage = sqlabfrage +
" ORDER BY es, de"
With
ds
.ActiveConnection = db
.CursorLocation = adUseClient
.CursorType = adOpenDynamic
.LockType = adLockOptimistic
.Open sqlabfrage
End
With
Set
Me
.Recordset = ds
Me
.txt_feld1.ControlSource = ds.Fields(
"es"
)
Me
.txt_feld2.ControlSource = ds.Fields(
"de"
)
ds.Close
Set
ds =
Nothing
Set
db =
Nothing
End
Sub