Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

...I enjoy spending time on it for personal growth (I learn from the questions I don't answer, and I reinforce/stay sharp on the topics I do answer), and to give back to humanity at large...

Geography

Where in the world do Tek-Tips members come from?
merlynsdad (Programmer)
7 Jun 12 10:28
I have a report that needs to be viewed as well as printed. I have a button that prints it, and a button that views it. The coding on the VIEW button is simply

CODE

DoCmd.OpenReport "rptOpenTickets", acViewPreview
This doesn't work, however, because the Access framework is not up when the button is pressed. I don't want the framework up, but I still need to be able to have people view the report, rather than print it. What's the best way to do this?

If the square peg won't fit in the round hole, sand off the corners.

dhookom (Programmer)
7 Jun 12 13:25
Try change your code to:

CODE --> vba

DoCmd.OpenReport "rptOpenTickets", acViewPreview , , , acDialog

Duane
Hook'D on Access
MS Access MVP

merlynsdad (Programmer)
7 Jun 12 13:41
If that's 3 commas, as in

CODE

DoCmd.OpenReport "rptOpenTickets", acViewPreview , , , acDialog
it froze the program.
The only thing showing is a form. On the form is a button, and the above line of code is the only code in the click event for that button. Now if I'm working in the Access environment, it works just fine, but then so does my original code.

If the square peg won't fit in the round hole, sand off the corners.

dhookom (Programmer)
7 Jun 12 18:19
I guess I missed the "Access framework" or didn't understand what you meant. I think you need to provide the details of the environment if you expect a good answer.

Duane
Hook'D on Access
MS Access MVP

merlynsdad (Programmer)
8 Jun 12 9:18
The Access environment is not showing; the only thing up is a form. The form has a button that prints a report. What I want to do is add another button to view the report AS PRINTED, so the user doesn't have to print it every time he wants to see it. The owner/user of this portion of the db doesn't know Access that well, so I'd rather keep him from having to open Access to do a print preview. I've looked online, and seen several add-ins that will do this, but I can't use an add-in. How do I code that VIEW button so he can do this?

If the square peg won't fit in the round hole, sand off the corners.

Helpful Member!  dhookom (Programmer)
8 Jun 12 9:30
I don't know how you are hiding the Access environment. Perhaps you can create a PDF report.

Duane
Hook'D on Access
MS Access MVP

merlynsdad (Programmer)
8 Jun 12 11:41
I figured it out. I'm following the guidelines in FAQ705-2562: Hide The Access Window "Hide the Access Window" to hide the environment. When I started this project there were no reports, so I ignored Step 5. When I added reports, I forgot the guidelines I'd used to hide the environment. Asking me how I hid it triggered a thought, and I went back to the guidelines and discovered Step 5. I implemented it, and the user can now preview the report from a button.

If the square peg won't fit in the round hole, sand off the corners.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close