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.

Datensatznummer - Access

Empfohlene Antworten

Veröffentlicht

Frage: wie bekomme ich die Datensatznummer wenn mir der Primärschlüssel bekannt ist? Gibt es dazu eine Funktion unter VBA??

<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Zitat:</font><HR>Original erstellt von Naberius:

<STRONG>Frage: wie bekomme ich die Datensatznummer wenn mir der Primärschlüssel bekannt ist? </STRONG>

Hi Wolle Danke für den Tipp,

was ich damit will??, ganz einfach ich habe eine Abfrage die in einem Listenfeld dargestellt wird, nun will ich bei einem klick auf einen Datensatz im Listenfeld den betreffenden Datensatz in einem neuen Formular öffnen.

Danke nochmal...

Naberius

Das kannst du aber auch einfacher und besser haben ;)

Mach das doch einfach mit einem Filter, wie im anderen Thread beschrieben:

docmd.openForm "Formularname", acNormal,,"id=" & Listenfeld.value

Wenn du statt einer Zahl in der ID einen String hast, mußt du noch Hochkommas setzten:

docmd.openForm "Formularname", acNormal,,"id='" & Listenfeld.value & "'"

Hallo,

wenn dir der Wert des Primärschlüssels bekannt ist dann nimm doch die folgende Funktion:

Dim dbsTabelle As Database, rsTabelle As Recordset

Dim i As Byte

dim Suchdatum

Set dbsTabelle = DBEngine.Workspaces(0).Databases(0)

Set rsTabelle = dbsTabelle.OpenRecordset("tab_Tabelle", dbOpenTable)

DoCmd.SetWarnings True

rsTabelle.Index = "Primärschlüssel"

rsTabelle.Seek "=", Suchdatum

DatuminZahl = rsTabelle!Spalte

Du mußt nur in der Entwurfsansicht der Tabelle, in der Spalte des Primärschlüssels "Indiziert( Ja ohne Duplikate" Aktivieren.

Gruß Fchris

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.