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.

Wo liegt meine Datenbank?

Empfohlene Antworten

Veröffentlicht

Moin,

ich sitze grade über ne Access 97 DB und bräuchte die Möglichkeit eines relativen Pfades. Und zwar habe ich folgende Ausgangssituation:

Ich habe die Datenbank im Ordern X liegen.

Zu der DB gehören Fotos, die in einer definierten Verzeichnisstruktur liegt.

Die Fotos werden in einem Formular in Access dargestellt.

Wie kann ich im VBA rausfinden wo meine Datenbank liegt, damit ich quasi einen relativen Pfad erstellen kann und das komplette Konstrukt auch mal auf CD kopieren und ohne Aufwand an anderer Stellte einsetzen kann?

Thx for Help

Lung

Originally posted by Der Kleine

CurrentDb.name

:uli

Danke, aber ich muß gestehen, ich bin ein klein wenig aus der PRogrammiererei raus,

kannst du mir auch den restlichen Quellcode nennen?

Thx

Lung

CurrentDb.name ergibt im VBA für Access einen String, der den kompletten Pfad und Dateinamen widerspiegelt.

Um genau (nur) den Pfad zu bekommen, liefert meines Wissens Access keine Funktionalität. Also selber schreiben :

Function pfad_name(auswahl As Boolean) As String

Dim i As Integer

Dim location As String

location = CurrentDb.name

i = 0

Do Until Mid$(location, Len(location) - i, 1) = "\"

i = i + 1

Loop

If auswahl Then

pfad_name = Left$(location, Len(location) - i) 'Pfad

Else

pfad_name = Mid$(location, Len(location) - i + 1, i) 'Name

End If

End Function

Übergabeparameter auswahl = true : Ergebnis : Pfadname

Übergabeparameter auswahl = false : Ergebnis : Dateiname

Hoffe es reicht!

Aufruf mit : pfad_name(true) bzw. pfad_name(false).

Jungs,

vielen Dank,

ihr seit echt die Besten!

Gracias

Lung

:uli

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.