Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[ACCESS] Not in List - Ereignis

Empfohlene Antworten

Veröffentlicht

Hab hier einen Code - Schnipsel:

Private Sub Kombinationsfeld18_NotInList(NewData As String, Response As Integer)

On Error GoTo fehler

Dim db As Database

Dim rs As Recordset

Dim erg As Integer

Response = acDataErrAdded

erg = MsgBox("Der eingegebene Wert '" & NewData & "' ist nicht in der Liste vorhanden. Möchten Sie " & "den Wert in die Tabelle übernehmen?", 52, "Neuer Wert")

If erg = 6 Then

Set db = CurrentDb

Set rs = db.OpenRecordset("Daten", dbOpenDynaset)

rs.AddNew

rs!NamTxt = NewData

rs.Update

rs.Close

Set rs = Nothing

db.Close

Else

Response = acDataErrContinue

End If

ende:

Exit Sub

fehler:

MsgBox Err.Description, 16, "Fehler"

Resume ende

End Sub

Soweit ist das ja auch ganz OK, aber wie umgeh ich diese unnötige Abfrage, von wegen nicht in Liste und ob ich die Daten in die entsprechende Tabelle übernehmen will?

Hab jetzt selbst 'ne Lösung


Option Compare Database
Private Sub vo_ansprechpartner_NotInList(NewData As String, Response As Integer)

On Error GoTo fehler

Dim db As DAO.Database
Dim rs As DAO.Recordset

Response = acDataErrAdded

Set db = CurrentDb
Set rs = db.OpenRecordset("tbl_Ansprechpartnerdaten", dbOpenDynaset)
rs.AddNew
rs!nachname = NewData
rs.Update
rs.Close
Set rs = Nothing
db.Close

ende:
Exit Sub

fehler:
MsgBox Err.Description, 16, "Fehler"

Resume ende
End Sub
[/PHP]

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.