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.

VB: Laufzeitfehler 91 - Zugriff auf AccessDB

Empfohlene Antworten

Veröffentlicht

Hallo,

versuche einen Datensatz innerhalb einer DB von einer Tabelle in eine andere zu verschieben... Leider bringt mir meine Kiste den Laufzeitfehler 91: Objektvariable oder With-Blockvariable nicht festgelegt.... Was immer das heissen mag...

So wie es aussieht, kommt er mit dem AddNew nicht klar... Nur warum?

Kann mir da bitte jemand helfen? Wär echt klasse... DANKE! -Chris;-)

Anbei der Code:

Private Sub Form_Activate()

'Datenbank öffnen

Open "C:\Moldausschuss\Pfad_DB.txt" For Input As #1

Line Input #1, Pfad_DB

Close #1

datMoulDelete.DatabaseName = Pfad_DB & "Moldausschuss.mdb"

datMoulDelete.Connect = ";pwd=****"

datMoulDelete.Recordset.AddNew <<<<------ Hier bleibt er hängen!

txtDatum.Text = frmLaden.txtDatum.Text

txtMoldnr.Text = frmLaden.txtMoldnr.Text

cboLt.Text = frmLaden.cboLt.Text

cboWZnr.Text = frmLaden.cboWZnr.Text

cboWZpos.Text = frmLaden.cboWZpos.Text

cboMoldpos.Text = frmLaden.cboMoldpos.Text

txtMoldtyp.Text = frmLaden.txtMoldtyp.Text

cboDpt.Text = frmLaden.cboDpt.Text

cboUrsache1.Text = frmLaden.cboUrsache1.Text

cboUrsache2.Text = frmLaden.cboUrsache2.Text

cboUrsache3.Text = frmLaden.cboUrsache3.Text

frmLaden.datMoldausschuss.Recordset.Delete

Unload frmLaden

Unload frmSpeichern

Load frmEnde

frmEnde.Show

End Sub

Originally posted by ChrisDaHub

datMoulDelete.Recordset.AddNew <<<<------ Hier bleibt er hängen!

End Sub

Hallo, dein Problem ist eigentlich ganz einfach, die Objektvariable für dein Recordset enthält scheinbar noch keinen Wert (bzw. Objekt).

Ich weiß leider nicht was du mit "datmouldelete" machst. was ist dass und wie hast es deklariert ? (Auch gerne per PM)

Prüf mal ob es für dass datmouldelete.recordset die Methode "open" gibt und gib da in Klammer die Tabelle an. (ungefähr so: datmouldelete.recordset.open ("TABELLENNAME").

Dann sollte es klappen.

Gruss

Feivel

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.