Results 1 to 2 of 2
2001-08-07, 14:38 #1chucklesGuest
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.
2001-08-07, 17:50 #2
- 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
Set cat = Nothing
</pre><font face="Comic Sans MS"><font color=blue>~Shane</font color=blue></font face=comic>