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.

[VBA] Aktualisierungs problem

Empfohlene Antworten

Hallo alle zusammen,

hab folgende abfrage:

UPDATE AuswEbu SET AuswEbu.Abgewählt = True WHERE (((AuswEbu.[Bild-Nr#])= " & [Forms]![frmMHG]![kbBildNr] & ") 

AND ((AuswEbu.BildundCDDART)=No) AND ((AuswEbu.BildVorhanden)=Yes));")
diese funktioniert auch einwandfrei wenn ich das als ganz normale abfrage genieren lasse, doch sobald ich das ganze in VBA rein packe....
Dim db As Database

Set db = CurrentDb

db.Execute ("UPDATE AuswEbu SET AuswEbu.Abgewählt = True WHERE (((AuswEbu.[Bild-Nr#])= " & [Forms]![frmMHG]![kbBildNr] & ")

 AND ((AuswEbu.BildundCDDART)=No) AND ((AuswEbu.BildVorhanden)=Yes));")

...bekomme ich die meldung "das zuwenige Parameter übergoben worden sind"....ich steh total auf dem schlauch, kann mir nicht erklären warum auf einmal die abfrage nicht mehr funzt...weiss jemand wo dran das liegt?

Vielen dank im vorraus

grüße 2 da Beat

p.s. arbeite mit vba unter a97

Setz dir das SQL mal in einer Variable zusammen und lass dir die als msgbox ausgeben. Wäre interessant zu wissen, was wirklich genau drin steht.

Hallo Reinhold,

dieses gibt mir die msgbox aus:

UPDATE AuswEbu SET AuswEbu.Abgewählt = True WHERE (((AuswEbu.[Bild-Nr#])= S305277-01) AND

 ((AuswEbu.BildundCDDART)=No) AND ((AuswEbu.BildVorhanden)=Yes))

Original geschrieben von 2daBeat

UPDATE AuswEbu SET AuswEbu.Abgewählt = True WHERE (((AuswEbu.[Bild-Nr#])= " & [Forms]![frmMHG]![kbBildNr] & ") 

AND ((AuswEbu.BildundCDDART)=No) AND ((AuswEbu.BildVorhanden)=Yes));")
Ich nehme an, da fehlen Anführungszeichen:
UPDATE AuswEbu SET AuswEbu.Abgewählt = True WHERE (((AuswEbu.[Bild-Nr#])= '" & [Forms]![frmMHG]![kbBildNr] & "') 

AND ((AuswEbu.BildundCDDART)=No) AND ((AuswEbu.BildVorhanden)=Yes));")

Ich habe vor und nach dem Formularfeldinhalt jeweils ein ' eingefügt.

hth

Reinhold

Reinhold du bist ein schatz!!!:) -g-

danke für den tipp jetzt klappts!! vielen dank

schönes we!!

2 da Beat

Original geschrieben von 2daBeat

Reinhold du bist ein schatz!!!:) -g-

Wehe, wenn du mich küsst! :hodata

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.