Results 1 to 2 of 2
  1. #1

    Trying to use a Table property in a Report (9.0.3821/SR-1)

    I am creating a report using data from Table B. Table B was created using info from Table A. Table A was imported.

    I'd like to display on the report the "Last Updated Date & Time" for Table A, rather than Table B.

    Any thoughts?


  2. #2
    3 Star Lounger
    Join Date
    Mar 2001
    Minneapolis, Minnesota, USA
    Thanked 0 Times in 0 Posts

    Re: Trying to use a Table property in a Report (9.0.3821/SR-1)

    There are a couple of ways you might go about it. If the process is that you import Table A and immediately create Table B, simply insert a new field in the query that creates Table B along the lines of LastMod:Now(). Reference the contents of that field.

    If there is a lag or if you just want to be all spanky, you can use the ADO Extension for DLL and Security to get the LastModified property of Table A:

    <pre>Public Sub GetLastMod()
    'must have a reference set to Microsoft ADO Extension VV.v for DLL and Security
    Dim cat As ADOX.Catalog
    Dim dteMod As Date
    Set cat = New ADOX.Catalog
    cat.ActiveConnection = CurrentProject.Connection

    dteMod = cat.Tables("Table A").DateModified
    Debug.Print dteMod

    Set cat = Nothing

    End Sub
    <font face="Comic Sans MS"><font color=blue>~Shane</font color=blue></font face=comic>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts