Access 2007: How to run reports from forms???

Greetings,

I designed a form and ran the macro button wizard to create a button (with 
macro) to run my report.
This worked fine, with my report output also containing buttons to exit and 
print the report.

I later wanted to add validation to check if the report was empty, so I 
removed the button created by the wizzard and created my own, adding my own 
vba code.

The problem lies I can only run the report using 'DoCmd.OpenReport 
"rptStudentClassification", acViewPreview'
but this is a preview mode only and therefore cannot use buttons present on 
the report.

How do i run the rpeort to show output and allow buttons to be used?

Cheers
Rob 


0
Rob
2/20/2008 5:00:11 PM
access 16762 articles. 3 followers. Follow

2 Replies
1936 Views

Similar Articles

[PageSpeed] 17

Or to clarify further havig both buttons which openReport the wizard does 
NOT have magnify class allowing buttons to be pressed my own button does.

Macro codes uses ptStudentClassification, Report, , , Normal as the params.

Confused.com

"Rob W" <Whllrob@aol.com> wrote in message 
news:efDPbK%23cIHA.5984@TK2MSFTNGP06.phx.gbl...
> Greetings,
>
> I designed a form and ran the macro button wizard to create a button (with 
> macro) to run my report.
> This worked fine, with my report output also containing buttons to exit 
> and print the report.
>
> I later wanted to add validation to check if the report was empty, so I 
> removed the button created by the wizzard and created my own, adding my 
> own vba code.
>
> The problem lies I can only run the report using 'DoCmd.OpenReport 
> "rptStudentClassification", acViewPreview'
> but this is a preview mode only and therefore cannot use buttons present 
> on the report.
>
> How do i run the rpeort to show output and allow buttons to be used?
>
> Cheers
> Rob
> 


0
Rob
2/20/2008 5:28:03 PM
DoCmd.OpenReport "rptStudentClassification", 5, , Normal

Examing the macro (step by step) it runs this line of code.

What does the 5 mean?

"Rob W" <Whllrob@aol.com> wrote in message 
news:ebF1SY%23cIHA.4312@TK2MSFTNGP03.phx.gbl...
> Or to clarify further havig both buttons which openReport the wizard does 
> NOT have magnify class allowing buttons to be pressed my own button does.
>
> Macro codes uses ptStudentClassification, Report, , , Normal as the 
> params.
>
> Confused.com
>
> "Rob W" <Whllrob@aol.com> wrote in message 
> news:efDPbK%23cIHA.5984@TK2MSFTNGP06.phx.gbl...
>> Greetings,
>>
>> I designed a form and ran the macro button wizard to create a button 
>> (with macro) to run my report.
>> This worked fine, with my report output also containing buttons to exit 
>> and print the report.
>>
>> I later wanted to add validation to check if the report was empty, so I 
>> removed the button created by the wizzard and created my own, adding my 
>> own vba code.
>>
>> The problem lies I can only run the report using 'DoCmd.OpenReport 
>> "rptStudentClassification", acViewPreview'
>> but this is a preview mode only and therefore cannot use buttons present 
>> on the report.
>>
>> How do i run the rpeort to show output and allow buttons to be used?
>>
>> Cheers
>> Rob
>>
>
> 


0
Rob
2/20/2008 5:46:43 PM
Reply:

Similar Artilces:

Upgrade Path
I know there is an upgrade available for 2003 Standard to 2007 Professional with a retail price around $600. Can you also "upgrade" 2003 Standard licenses to just a 2007 CAL, and does anyone know the ballpark cost? The majority of my "standard" users won't need the desktop app once we switch to Server. -- PMP MCTS MS Project 2007 Terrie: I am not aware of any upgrade path from 2003 client to 2007 web CAL. In any event, the web CAL price is rather reasonable to begin with, and if you have any kind of discount with Microsoft, these are rather inexpe...

open 2003 db in 2007
i have a database created in a previous version of access and i have opened it in 2007. i want to export a report to excel, but the excel option is greyed out. what is wrong? xin wrote: >i have a database created in a previous version of access and i have opened >it in 2007. i want to export a report to excel, but the excel option is >greyed out. what is wrong? I think they removed that capability because it caused so much trouble or only worked in very specific circumstances. The solution to your problem is the same as it was in earlier versions: Export the report's rec...

Filter By Form...
Hello, I have a form that has two subforms on it. The first subform is linked to the main form, the 2nd subform is linked directly to the first subform. For some reason when I run a filter by form for a field on the main form I am unable to add a record to the 2nd subform. Im able to scroll through the first subform just fine, but the second subform I am stuck on the first record. I know this is complicated, but would anyone have a guess why I am stuck there? ...

Can't open a form
I posted this in the Outlook boards and got no answer. I may have found the reason. If I open Outlook to the .pst file I can create an appointment. It is only when trying to connect to Exchange I have a problem. So I think this may be a server side issue. Another point. My laptop runs Outlook 2k. I just tried making an appointment in O2K, which I could do. So now I am not sure if it is server side or not. When trying to open an appointment form by any method I get the following message "The form required to view this message cannot be displayed. Contact your administrator." Yes it ...

capturing the name of the active form in VBA
Is there a way to capture the name of the currently active form in VBA? Thanks in advance, Paul On Sat, 6 Feb 2010 18:23:47 -0800, "Paul" <BegoneSpam@forever.com> wrote: Did you try Screen.ActiveForm.Name? -Tom. Microsoft Access MVP >Is there a way to capture the name of the currently active form in VBA? > >Thanks in advance, > >Paul > I wasn't aware you could do that, and it works great. Thanks, Tom. One method is: Screen.ActiveForm.Name -- Hope this helps, Daniel Pineault http://www.cardaconsultants.c...

Pasting chart worksheet as link 2007
A chart created in 2007 and sitting in it's own sheet (not included on the data worksheet) will not display entirely if pasted as link (neither into Word nor PPT) Some of the chart seems to be "cut off" in the linked object. This seems to be connected to how much of the "canvas" is visible in Excel. Viewing the chart in Excel on a zoom so that it fills the whole screen seems to remedy this. Is there some setting in Excel that would allow us to set the worksheet chart to automatically size to window? Or else: does anyone know a way of pasting a worksheet chart as ...

Wachovia charging for MS Money Access
Well, one of the reasons I switched to wachovia two years ago from Wells Fargo was the free access to my own money data using Microsoft Money. Now Wachovia is going to start charging $5.95 per month starting in April. They have my money, are using it to fund loans and yet they want to charge me to simply communicate data. (Yes, I pay bill with it but they don't charge their customers for on-line bill pay which does the same thing.) So, what other bnks are out there that still have free access to accounts using Microsoft Money? Thanks. Steve No fees at Chase... It's been a ...

many sort criteria for one group in access report
Within one group I have, let's say, a return that starts with "A" and "B and "C". if the value starts with "A" I want to sort by field [x] if it starts with "B" sort by field [y]... etc. ...

Emailing from Access 01-14-08
Good Day Group, I have an access database on WindowsXP that creates an HTML attachment and addresses it from data from the database and sents it automatically to the mail agent (Outllook) to send it through. Using the same access database on Vista and Windows Mail , I get an error preventing this feature. Does the community have any recommendation on how to fix this problem for me? -- Oly Try the following code which should work for Outlook: http://www.datastrat.com/Code/OutlookEmail.txt If it doesn't, you problem is with permissions, not the code, and you'll need to dea...

Reports Not Accessible
Hello Everyone! We are currently having trouble accessing CRM reports. The report icon is missing from all related entities. What is wild is we can access the report server with no problems, and when I log into the CRM application server or the SQL sever and access the CRM application in IE explorer I receive the reports menu and can access all the reports just fine. Any thoughts or suggestions? r/ Anthony Akin Hi Did you find a solution to this problem, as we are experiencing the same problem of the report icon disappearing... it came back... now it has gone again. Thanks "awaki...

Print GL Account Desc on PO Blank Form
Hi, I've successfully added the GL Account Number to the printed form via KB859289. The instructions for that linked a table and then in the calculated field, it did: Function_Script(RW_GetAccountNumber POP_POLine.Inventory Index) Now, I am trying to add the Account Description. There is a core function called RW_GetAccountNumDesc. I tried Function_Script(RW_GetAccountNumDesc POP_POLine.Inventory Index) but that did not work. I also tried Function_Script(RW_GetAccountNumDesc AccountNumber) where AccountNumber is the calculated field from the KB859289 article. Anyone have any sugges...

Custom report with filters
Hi, I am doing resource allocations for projects in my company. Each project is considered a task and there are resources assigned to each project. Each resource is assigned to different departments. I would like to be able to produce reports sorted by department with the resources in each department and it showing what the resources are working on. Hi, Have you looked at the Resource Usage view? -- Jan De Messemaeker Microsoft Project Most Valuable Professional +32 495 300 620 For availability check: http://users.online.be/prom-ade/Calendar.pdf "eedwards" ...

report scheduler errors
Is there a way to trigger having the Report Schedule window appear without attempting to see some 3rd party series' we have created? We get resulting errors "Invalid value for series 11" as the window creates records in the 'ReportNames' table. We need to ignore these RPTGRIND = 11 records when the window opens. We have no source code for this dictionary. ...

How access Irish Pension Board Spreadsheet PRSA charges? #2
My Email address is lvmcn1@hotmail.com I am looking for details of the charges commissions and durations of PRSA's so as to get my ssia money out of my current account where it is gaining no interest!!!! Having no clue as to where to find the spreadsheet, website or anything else, not much to offer. Do you have a copy of the spreadsheet? If so, what problems are you having getting the information from it? Is it only available for viewing at a website? A web query might get you the information you need. Not much for us to go on here. "Lum" wrote: > My Email ...

run-time error 1004
i have a workbook with macros and some vba scripts and have password protected some of the sheets. i have created this workbook in Excel 2002. I distributed it to users using Excel 2000, who are getting Run Time Error 1004, the file is protected and will be read-only. The sheets are protected but i have opened ranges for data entry. All works well for users with Excel 2000. What I have tried without success: - Save File As | Tools | General Options | Advanced | Encryption Type - Weak or Office 97/2000 compatible. it still gives the run-time error. anyone has seen this? Ooh. I think...

sql service pack 3
Below is a statement from Microsoft. So i should upgrade to SP3 for the dpm 2007 using Express Edition ? ============================================== We would like to remind all customers that Service Pack Support for SQL Server 2005 Service Pack 2 (SP2) ended on January 12, 2010 and support for SQL Server 2008 RTM will end on April 13, 2010. Microsoft is ending support for these products as part of our Service Pack support policy, found in http://support.microsoft.com/lifecycle. Both SQL Server 2005 SP2 and SQL Server 2008 RTM will no longer receive a...

Vital Reports
We have been using RMS (HQ & Store Ops) for two years and although it is great at alot of things is lacks in many areas that a retailer needs to report on. We are trying to find out a way to report on "None Moving" stock, there is no standard report for this in either parts of the system & I wonder if anyone else has this problem & how they have resolved it? Is there anyone that knows of a source for reports in RMS (if tah makes sense) Try our Markdowns Control Report included with RMS Toolkit trial. All 100+ reports and templates are free to keep whether you decid...

Outlook 2007 issue with Vista
I have notice an issue I have with sending files as attachments when right-clicking on the file and choosing to send to email reciepient. I've tried this a few times and find my Outlook program does not start to create an email with the file attached. I also cannot get the Outlook program to start unless I re-boot the computer. Not sure if it is more a Vista issue or Outlook 2007 issue. I find it is better to open Outlook, start a new message and just attach the file. Hey Scott, Are you using a 64 bit version of Windows Vista? How to find the version of Windows Vista ---Click ...

Drag & Drop Changes in Outlook 2007
Outlook’s Drag & Drop functionality works differently in Office 2007 then it does in Office 2003. When I right click to Drag and Drop an E-mail from an OL folder to my desktop, I am given the option to Move or Copy the Item. When I select Move, the item is moved to the desktop. In OL 2003 the moved item will be automatically placed in the OL Deleted Items Folder. In OL 2007 the item is not automatically placed in the Deleted Items Folder. How do I restore this functionality in Office 2007? I am Running Office 2007 SP2 under Windows 7 Ultimate. ...

Are others having problems accessing this newsgroup?
Hi, For a couple days now, when I receive a notice in my Hotmail mail about a reply to a post I made here, I click on the "Read and rate the response" link and I get: "Sorry, the page you requested is not available. The page you were looking for is currently not available. The address may not be correct, or there may be a temporary problem with this site. Please try one of the following options: Check the address for typing errors. Click the Back button and try a different option from the navigation menu. Try this page again later. For additional assistance, try one of the...

Daemon Tries to access internet when opening OE
When I try to open Outlook Express to check e-mail, my Zonealarm firewall tells me that "Daemon is trying to access the internet." Since I read somewhere this is not a legitimate program, I denied it. What is this program? Zone Alarm Labs identified for me the follwing location in Windows: C:/WINNT/System32/SK9910DME.EXE The software maker for this little piece of magic is "Silitek", not Microsoft, so it definately should not be running with Outlook I think. ...

Excel report help
I did a quick search on this topic and to be honest found that I know s little about this topic, that I was lost trying to understand what saw. So to be honest, I am looking for someone to basically hand hol me through this problem. A coworker has a report that she files once a month, this report is culmination of four Excel reports into one. The four reports we ar combining consist of a beginning of month inventory, end of mont inventory, cost of inventory, and product ordered and shipped. The problem I am running into is that none of the reports she is abl to pull from our database has a...

Reports Library in Customer Source
This may sound dumb, but I don't like to assume anything ... All the reports on Customer Source are for "Great Plains Release 7.0". Our version is 7.5. Will these work with our version ? TIA, Ken Yes, the 7.0 reports library reports work just fine with 7.5 Leslie "ms" wrote: > This may sound dumb, but I don't like to assume anything ... > > All the reports on Customer Source are for "Great Plains Release 7.0". > > Our version is 7.5. Will these work with our version ? > > TIA, > > Ken > > > ...

RM Accounts Due Report
I am trying to get a user defined field from the SOP Invoicing transactions onto the RM accounts due report. I am trying to link up to the RM Open File and am getting some errors. I am having trouble finding what table to link to and how to get this on the report. I thought I had it then when I wen to run it it said error: restriction/sort error. I didn't even do anything with that part of the report. please advise. Thank you. Link the Sales Transaction History table to the RM Open File. Then link the Sales User-Defined Work History to the Sales Transaction History table. C...

Reporting Services Error 08-30-07
Hi, I created a report that pulls info from the ContractExtensionBase table, ContractBase, and ContractDetailBase table. The report runs fine under the System Admin Account however every other user is unable to run it. The error i get is: "An error has occurred during report processing. (rsProcessingAborted) Query exection failed for data set 'CRM'. (rsErrorExecutingCommand) Select permission denied on object...." I tried playing around with the permissions on other roles but still get the same error. I have created reports before and never had this problem. Anyone ...