Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old October 1st, 2003, 04:41 AM
Registered User
 
Join Date: Oct 2003
Location: gisborne, , New Zealand.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default On click open a report

hi all.
this might sound a bit basic, but so are my skills at the moment with access.
the thing im looking to be able to do is...

How do i make it so a report opens when i click a button in a form... is it possible? im sure there must be a way.
cheers all

ViTA

Reply With Quote
  #2 (permalink)  
Old October 1st, 2003, 08:54 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Connersville, Indiana, USA.
Posts: 126
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Good morning.
Once you have created your button, create an "on click" procedure. (I don't recommend using the wizard for this...my opinion is that it is easier to create a button with out the wizard when you are going to create your own event for it.)
For the code, you'll use the following line of code:
Docmd.OpenReport "Report Name", view preferred, filter, condition, window mode, open arguments

The "Docmd.OpenReport" you will type in. The view, filter, condition, window mode, & opening arguments are all items that you chose depending on exactly how you want the report to open.
I hope this helps.

Regards,
Laura

The only thing standing between you and your goal is doubt. Quit doubting yourself and you'll be able to accomplish anything!
Reply With Quote
  #3 (permalink)  
Old October 1st, 2003, 10:03 AM
Friend of Wrox
Points: 3,947, Level: 26
Points: 3,947, Level: 26 Points: 3,947, Level: 26 Points: 3,947, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,150
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Quote:
quote:Originally posted by lbreitenbach
(I don't recommend using the wizard for this...my opinion is that it is easier to create a button with out the wizard when you are going to create your own event for it.)
Really? I'm just the exact opposite. When I create a button with an event I let the Wizard do its thing and then I tweak the code it generates with what I want. It's great because it does 80% of the typing I would have done without syntax error or misspelling; and it takes care of "Now what exactly is the syntax for that command?" or "Now what command was that again?"

Vita, if you do elect to keep the Wizard on, you'll see the command Laura talked about and all you have to do is tweak it.


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
Reply With Quote
  #4 (permalink)  
Old October 1st, 2003, 08:52 PM
Registered User
 
Join Date: Oct 2003
Location: gisborne, , New Zealand.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

zzzzzoooommmmm
straight up and over my head.

i understade the whole = Docmd.OpenReport "report name" bit and where to put it (the onclick field) but what i dont get if the filter, condition, window mode..... and is the expression builder the wizard that you are tlaking about??

sorry for my ignorance but i am trying to learn this, and not haveing a teacher or a book that goes past the basics is a bit hard :>

thanks all
VitA

Reply With Quote
  #5 (permalink)  
Old October 2nd, 2003, 07:47 AM
Friend of Wrox
Points: 3,947, Level: 26
Points: 3,947, Level: 26 Points: 3,947, Level: 26 Points: 3,947, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,150
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Quote:
quote:Originally posted by vita
 zzzzzoooommmmm
straight up and over my head.
Don't panic!

In design view on your form, use the toolbox create a new button, choose to create an open report button, let the Wizard create the button then edit the code it creates. You'll see a line that starts with "DoCmd.OpenReport". Place your cursor on the word "OpenReport" and press the F1 key. You'll get help on everything Laura talked about.


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Right click to Open a menu peace2007 Ajax 2 November 5th, 2007 02:25 AM
how to open new window on button click nittin14 ASP.NET 1.0 and 1.1 Basics 8 April 28th, 2007 01:13 AM
double click to open link thutt Dreamweaver (all versions) 0 February 8th, 2007 05:01 PM
Open a new window on a button click ag19702004 .NET Framework 2.0 1 January 6th, 2007 12:21 AM
Click even code for open DOS .EXE mohiddin52 Access VBA 4 October 18th, 2006 01:20 PM



All times are GMT -4. The time now is 06:36 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.