473,387 Members | 1,425 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Displaying Metadata in Report Footer

14
Good afternoon-

I have several reports that are based on local tables formed from querying an ODBC database. When the download occurs successfully, I record the date/time as the only record in a LOCAL_UPDATE table. Now, however, I would like the footer of the report to display that date/time. This way, once the report is printed, the user can know how up-to date the data acquisition is, not matter when the report was actually run.

When I put the control source for the textbox as:
Expand|Select|Wrap|Line Numbers
  1. =[LOCAL_UPDATE]![UPDATE_LAST]
I get a parameter box asking for a value for LOCAL_UPDATE when I run the report. I can't seem to get any of the aggregate functions to work.
I even went so far as to edit the query, so that it now creates a field [DOWNLOAD_DATE], (set to the current date when the query runs) for all records.

I am trying to do something that can't be done? I am afraid users will base their trust of the data on the date the report was printed, which is not entirely accurate.

Thank you for any help you can provide. This is a low priority item, as I am freelancing this project for a buddy.

Matt
Apr 11 '07 #1
4 1500
Coastie
14
Nevermind...

I figured out how to use the TableDef property and return the date using VB. Sorry for wasting everyone's time.

Matt
Apr 11 '07 #2
Denburt
1,356 Expert 1GB
No problem you might consider using the "Dlookup" function it may or may not be quicker. I would try it both ways just to check.
Apr 11 '07 #3
Coastie
14
No problem you might consider using the "Dlookup" function it may or may not be quicker. I would try it both ways just to check.
It was just easier to do this:

Expand|Select|Wrap|Line Numbers
  1. Public Function LastDownload() As Date
  2.     Dim rst As Recordset
  3.     Set rst = CurrentDb.OpenRecordset("LOCAL_UPDATE")
  4.     rst.MoveFirst
  5.     LastDownload = rst!UPDATE_LAST
  6. End Function
  7.  
Because there is only one download time, and all the downloads are in the form of make-table queries, all the data is downloaded at the same time, so this makes it a mite easier.

Matt
Apr 12 '07 #4
Denburt
1,356 Expert 1GB
You need to close that recordset and set the variable to nothing otherwise you will use way more resources than needed and it will cause your database to expand much more than necessary. Error handling is always a pulls just in case your code is interrupted and is unable to update this table.


Expand|Select|Wrap|Line Numbers
  1. Public Function LastDownload() As Date
  2.     Dim rst As Recordset
  3.     Set rst = CurrentDb.OpenRecordset("LOCAL_UPDATE")
  4.     rst.MoveFirst
  5.     LastDownload = rst!UPDATE_LAST
  6.  rst.Close
  7. set rst=nothing
  8. End Function

I have a similar date type field that lets my users know what date the data was last updated but I simply used the following, again i am not sure which would be quicker and I wouldn't use to many Dlookups but one or two doesn't seem to hinder the performance.

I put the control source for the textbox as:
=DLookUp("UPDATE_LAST","LOCAL_UPDATE")

FYI:
One more thing I wanted to point out I recently had two instances back to back in two different databases where the underscore really screwed me (MS Access 2003). It only happened when I had two in the same field and the databases were fine for a year or so then one day they went belly up (Microsoft update bug maybe) but it was enough for me to back off on using any special characters anymore. I tend to use a Simple uppercase lower case scenario such as: UpdateLast
Apr 12 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Martin | last post by:
Hi, I have an Access 97 report that mimics an official UK Covernment Customs document, with Page Headers and Footers presenting static data for each page (logos etc). The report is made up...
1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
3
by: ahaque38 | last post by:
Hello. Using A2K SP3, I am having the following problem with a report using "Sorting and Grouping". I have recently added a grouping in the reports for "Category2<>'CONTRACTS'". I have...
1
by: Richard Hollenbeck | last post by:
How can I (if I can) display the sum of a text box values in the Detail in another text box in the page's footer? For example, I have a text box called "txtPoints" in the detail which displays...
0
by: galkas | last post by:
Hello I have got a report, which can run on 3 groups of data: College Faculty School Faculty contains schools. College contains faculties. The report can be run for college, then it includes...
7
by: SueB | last post by:
Greetings. I have a report based on the following query (hang in there ... it's quite long): SELECT Year(.) AS Yr, tblEvents.eventID, tblEvents.eventname, tblEvents.eventhost,...
13
by: Greg | last post by:
Most suggestions on this topic recommend to use a page footer and make it visible only on the last page. My problem is that the footer is half of the height of a page which means the detail would...
3
by: hestres | last post by:
Hello, I'm working on some link styles for this page: http://www.house.gov/velazquez/lh0205tres/reports.html I want all the links to always display in red (#CC0000), but in IE6 and 7 they...
2
by: Simon | last post by:
Dear reader, In case a report is a sub report the Report Header of the sub report is printed in the report but the Page Header of the sub report will not be printed. This is the same for...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.