reports

F

Fubardave

I have made a custom toolbar for my reports, which has coding behind it, such
as that below, to print the report.

Public Function PrintNow() ' Prints the report
On Error Resume Next
Dim strRptName
strRptName = Screen.ActiveReport.Name
DoCmd.SelectObject acReport, strRptName, False
DoCmd.PrintOut acPrintAll
End Function

I would like to re-creaate the report navigation buttons (next page,
previous page, last page, first page) but cannot for the life of me find the
relevant coding that I need.

I cannot believe that I am the first person to try this but I am stumped.
Can any of you experts help or am I trying to do something which cannot be
done ?
 
D

Dirk Goldgar

Fubardave said:
I have made a custom toolbar for my reports, which has coding behind it,
such
as that below, to print the report.

Public Function PrintNow() ' Prints the report
On Error Resume Next
Dim strRptName
strRptName = Screen.ActiveReport.Name
DoCmd.SelectObject acReport, strRptName, False
DoCmd.PrintOut acPrintAll
End Function

I would like to re-creaate the report navigation buttons (next page,
previous page, last page, first page) but cannot for the life of me find
the
relevant coding that I need.

I cannot believe that I am the first person to try this but I am stumped.
Can any of you experts help or am I trying to do something which cannot be
done ?


Stephen Lebans has found a way to do it, at least to some extent, but it's
both complicated and kludgey. See his page here:

http://www.lebans.com/controlreports.htm
ControlReports.zip is a database containing functions to allow the
developer programmatic control of the Report Print Preview Window.
Specifically you can access the ZOOM and Current Page Number Controls.
 
F

Fubardave

Dirk,

any chance you have a 2003 version of this as I can't open it (as it is read
only). I guessed it would not be easy as I have been searching for ages
without success.
Regards, Dave
 
D

Dirk Goldgar

Fubardave said:
Dirk,

any chance you have a 2003 version of this as I can't open it (as it is
read
only). I guessed it would not be easy as I have been searching for ages
without success.


I don't follow you. I downloaded it, opened it in A2003, and was prompted
if I wanted to convert it. I said yes, and it did. Weren't you able to do
that?
 
F

Fubardave

No, when I open the file it gives an error message saying that it needs to
overwrite certain fields to convert the file, but it cant overwrite them
because the file is read only ?

Not to worry if its a problem, I can go to a friends house who has A2007
installed.

Thanks for all your help Dirk - your a gentleman and a scholar !
 
D

Dirk Goldgar

Fubardave said:
No, when I open the file it gives an error message saying that it needs to
overwrite certain fields to convert the file, but it cant overwrite them
because the file is read only ?

Not to worry if its a problem, I can go to a friends house who has A2007
installed.

It's an Access 97 database, so you shouldn't need that. I don't know why
the file would be read-only -- it wasn't for me. You didn't write it to a
CD or DVD, did you?
Thanks for all your help Dirk - your a gentleman and a scholar !

You're welcome, if misled. <g> If you can't get it to work, I can send you
the converted version I made; it's just that I don't like distributing
other people's work without their express permission.
 
F

Fubardave

Dirk,

thanks got it opened. It is exactly what I want but your right about it
being complicated !! Thanks a million for all your help,

Best Regards,
Dave
 

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