alibacha
asked on
How to put date and file name in the footer
I am trying to put date and file name in the footer of a file exported from access and print it with preset alignment.
What is the code for the date and file name.
What is the code for the date and file name.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
What type of Object are you Exporting?
What format are you exporting it to?
How are you performing the Export (manually or via code)
"and print it with preset alignment."
?
...Can you explain exactly what this means?
Please be specific.
I will presume by what little info on this you posted, that you want some Access Data exported to Excel?
If so, this can easily be done in a Report.
Create the report from your source data.
In the Report footer insert a textbox control and set the control source to: =Date()
Set the name to: txtDate
Then in the Report footer insert another textbox control but leave the control source blank.
Name this control: txtDBName
Then on the Format event of the Report Footer, put code like this:
Me.txtPath = CurrentProject.Name
See the attached sample.
Study it carefully and I am sure you will be able to adapt it to work in your database.
;-)
JeffCoachman
db310.mdb
What format are you exporting it to?
How are you performing the Export (manually or via code)
"and print it with preset alignment."
?
...Can you explain exactly what this means?
Please be specific.
I will presume by what little info on this you posted, that you want some Access Data exported to Excel?
If so, this can easily be done in a Report.
Create the report from your source data.
In the Report footer insert a textbox control and set the control source to: =Date()
Set the name to: txtDate
Then in the Report footer insert another textbox control but leave the control source blank.
Name this control: txtDBName
Then on the Format event of the Report Footer, put code like this:
Me.txtPath = CurrentProject.Name
See the attached sample.
Study it carefully and I am sure you will be able to adapt it to work in your database.
;-)
JeffCoachman
db310.mdb
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
&[Date]
for the date.
And you can use:
&[File]
for the file name.