Hallo Ingo,
wo genau muss Listbox.Requery dann hin?
Der Code für die Sub wenn ich auf den „NEU“ Button klicke sieht so aus:
Private Sub Befehl106_Click()
Dim Mldg, Titel, Hersteller
Dim z As Variant
Dim objcon As ADODB.Connection
Dim rstTab As ADODB.Recordset
If MsgBox(„Wollen Sie neuen Matchcode hinzufügen?“, vbYesNo + vbQuestion, „Neuer Matchcode“) = vbYes Then
z = InputBox(„Bitte geben Sie den Matchcode ein:“, „Neuer Matchcode“)
Set objcon = Application.CodeProject.Connection
Set rstTab = New ADODB.Recordset
rstTab.CursorType = adOpenDynamic
rstTab.LockType = adLockOptimistic
rstTab.CursorLocation = adUseClient
rstTab.Open „Softwarebestand“, objcon, , , adCmdTable
rstTab.AddNew
With rstTab
.Fields(„Matchcode“).Value = z
.Update
End With
rstTab.Close
Set rstTab = Nothing
Set objcon = Nothing
antw = MsgBox(„Der Matchcode " & z & " wurde der Tabelle hinzugefügt!“, _
vbOKOnly + vbInformation)
aktualisieren_Click
Else
End If
End Sub
MfG Sabine L.
[Bei dieser Antwort wurde das Vollzitat nachträglich automatisiert entfernt]