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.

Datensätze von VB in Access erstellen

Empfohlene Antworten

Guten Abend,

ich habe folgendes Problem:

Ich möchte über ein Formular von VB, Daten in eine bestehende Access Datenbank übertragen.

Das ist der Quelltext:

Private adoCn As ADODB.Connection

Private adoCn As ADODB.Connection

Private adoRs As ADODB.Recordset

Const DbPfad As String = "F:\Programmieren\Test\Angaben.mdb"

Private Sub cmdStart_Click()

With adoRs

.AddNew

.Fields("Name") = Me.txtName

.Fields("Vorname") = Me.txtVorname

.Fields("Alter") = Me.txtAlter

.Update

End With

End Sub

Private Sub Form_Load()

Set adoCn = New ADODB.Connection

With adoCn

.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DbPfad

.Open

If .State = adStateOpen Then

MsgBox "Verbindung mit der Datenbank wurde hergestellt!"

Else

MsgBox "Achtung: Die Verbindung mit der Datenbank wurde nicht hergestellt!"

End If

End With

End Sub

Verbindung mit Datenbank wird erstellt. Nur wenn ich die Daten eingebe und auf den Butten Klick kommt folgende Fehlermeldung:

Objektvariable oder With-Blockvariable nicht festgelegt

Ich hoffe Ihr könnt mir weiter helfen da ich ziemlich neu in VB bin.

Habe auch nichts richtiges im Internet gefunden.

:(

Hat sich erledigt kann geschlossen werden. Sorry Für den unnötigen Eintrag.

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.