Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    [Access] Etichetta su report della data ultima modifica di una tabella

    Ho un database che una tabella esistente in un altro database. Nel report vorrei far uscire la data dell'ultima modifica della tabella. Come posso fare? in pratica quel valore che visualizzo quando faccio tasto dx sulla tabella "Proprietà". Consigli? Grazie mille

  2. #2
    prova questa routine. Nella finestra immediata ti visualizza tutto quello che puoi desiderare.
    sostituisci alla tabella "TUATABELLA" il nome della tua tabella del DB.
    Credo riuscirai a modificare il tutto per estrarre solo i dati che ti interessano ed eventualmente a depositarli in una variabile Public.
    mau

    -----
    Sub informazioni()
    Dim dbs As Database, ctr As Container, doc As Document
    Dim intI As Integer
    Dim strTabChar As String
    Dim prp As DAO.Property

    Set dbs = CurrentDb
    strTabChar = vbTab
    ' Set Container object variable.
    Set ctr = dbs.Containers("Tables")
    ' Set Document object variable.
    Set doc = ctr.Documents("movcassa")
    doc.Properties.Refresh
    ' Print the object name to Debug window.
    Debug.Print doc.Name
    ' Print each Object property to Debug window.
    For Each prp In doc.Properties
    Debug.Print strTabChar & prp.Name & " = " & prp.Value
    Next

    End Sub
    -------

  3. #3

    errata corrige

    scusami, nella fretta ho commesso un errore. devi modificare il nome tabella "movcassa". Lascia i doppi apici, naturalmente!
    mau

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.