Metadata in reports

P

pepenacho

I googled this and am unable to find a straight answer. I have two qestions.

1) I'd like to put some basic metadata into an Access report. For example,
the date and time of the last update to the table from which the report is
sourced. Is there a good article anywhere on this that would also give me a
list of functions that can spit out metadata?

2) I got parts of this to work... but not entirely. If my table has 20
records and a field with dates. Let's say the dates range from
5/1/08-7/15/08. I need a function, in the report, that will take the highest
date, look at its month (in this case 7/15/08), and spit out the name of the
month as July (and not 07). I tried for 3 hours every combination in the
function writer and I cannot get it to spell out July.


Thanks
pepe
 
A

Allen Browne

Part 2 is easy. Place a text box on your report, and set its ControlSource
property to:
=DMax("YourDateField", "YourTable")
Set the Format property of the text box to:
mmmm

Part 1 is more involved. Are you talking about:
a) the data data update to the table, or
b) the last schema change to the table?

If (a), Access does not record this for you. You will need to create a field
for the purpose. Typically you silently maintain this in Form_BeforeUpdate,
e.g.:
Me.LastUpdateDateTime = Now()
and you can then read the date and time of the last update from this field.

If (b), try:
CurrentData.AllTables("YourTable").DateModified
The date is also found in MSysObjects, but Access has not been maintaining
that date correctly since Access 2000.
 
P

pepenacho

I'll give these a try, thank you.

For Part 2, I did try DMax...but I may have forgotten to set the format
property to mmmm

That's odd, I once did this in my sleep.

For Part 1, you are right, I was looking for 1a.

I'm into Crystal Reports lately and the whole metadate bit is a breeze there
compared to Access, although I'm hearing of rumors of improvements in that
department for Access in the 2007 version.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top