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 Enterereigniss ??

Empfohlene Antworten

Hallo zusammen,

ich will nach dem der User die Entertaste in einem Textfeld drückt ein Ereigniss ausgelöst wird!! Ich kann aber kein "Return" - Ereigniss finden!!

Ciao

Antibiotik

hi,

es muesste ein key_pressed oder key_down ereignis geben. in diesem kannst du den key_code anfragen ( =vbEnter oder so aehnlich)

hoffe, es hilft...


Private Sub Text1_KeyPress(KeyAscii As Integer)


  If KeyAscii = 13 Then

    MsgBox "hallo"

  End If


End Sub

hallo,

des hier ist mein code



Private Sub Text_Passwort_KeyPress(KeyAscii As Integer)

     If KeyAscii = vbKeyReturn Then MsgBox "hallo"

End Sub

geht aber nicht, weil er im formular gleich auf den OK Button geht!!

Ciao

Antibiotik

Original geschrieben von Antibiotik

hallo,

des hier ist mein code



Private Sub Text_Passwort_KeyPress(KeyAscii As Integer)

     If KeyAscii = vbKeyReturn Then MsgBox "hallo"

End Sub

geht aber nicht, weil er im formular gleich auf den OK Button geht!!

Ciao

Antibiotik

...dann mach aus KeyPress KeyDown *räusper* :rolleyes:

hallo,

Original geschrieben von |roTekuGeL|

...dann mach aus KeyPress KeyDown und n EndIf schadet bestimmt auch nicht...

mit EndIf hat es nichts zutun!! Wenn die IF Bedingung in einer Zeile steht kannst dir das EndIf sparen

des andere probiere ich gleich aus!!

Ciao

Antibiotik

hallo,

jetzt spinnt access!!

Des mit der Entertaste funktioniert, aber er nimmt immer den alten value von diesem Textfeld!!

Wenn ich "hallo" eintippe, dann bekomm den leeren value zurück!!

wenn ich danach "test" eintippe, bekomm ich "hallo" zurück??

Woran kann des schon wieder liegen??

Ciao

Antibiotik

hmpf

wie holst du dir denn den text aus dem textfeld?

hast du es nochmal ohne das key zeug versucht?

hallo,

wenn ich auf den OK Button klick, dann gibts keine Probleme!!

Wenn das in dem KeyDown Ereigniss passiert, nimmt er immer den letzen Wert!!


Private Sub Text_Passwort_KeyDown(KeyCode As Integer, Shift As Integer)

    Dim sKennwort As String


    If KeyCode = vbKeyReturn Then

        sKennwort = Text_Passwort ' + vbKeyReturn        

        Call codieren(sKennwort)

    End If


End Sub

Ciao

Antibiotik

Ich weiß echt nicht woran das liegen kann... aber du kannst ja nochmal statt KeyDown KeyUp versuchen :floet: :rolleyes:

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.