open two different Access reports

Hi,

I was wondering if i can get some help here. I have two different reports 
that i want to open when a user clicks a button to view the reports for 
printing. Is there any way of popping them up at the same time in VBA?

Thank you in advance
0
Utf
3/30/2010 4:20:01 AM
access.modulesdaovba 1670 articles. 0 followers. Follow

4 Replies
953 Views

Similar Articles

[PageSpeed] 54

Associates wrote:
>Hi,
>
>I was wondering if i can get some help here. I have two different reports 
>that i want to open when a user clicks a button to view the reports for 
>printing. Is there any way of popping them up at the same time in VBA?
>
>Thank you in advance

Yes.  Call the DoCmd.OpenReport command twice... once with each report name.

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-modules/201003/1

0
PieterLinden
3/30/2010 4:39:28 AM
http://www.fontstuff.com/access/acctut19.htm
Go to the bottom of the page and download the sample.

Open the DB and hit Alt+F11.  Double-click on the form named 
'Form_frmReportFilter1' and you will see the VBA code.  

Replace this:
    If SysCmd(acSysCmdGetObjectState, acReport, "rptStaff") <> 
acObjStateOpen Then
        MsgBox "You must open the report first."
        Exit Sub
    End If

With this:
    If SysCmd(acSysCmdGetObjectState, acReport, "rptStaff") = acObjStateOpen 
Then
        DoCmd.Close acReport, "rptStaff"
    End If
    
    DoCmd.OpenReport "rptStaff", acViewPreview

Close, Save, Run.

That's an excellent example of how these things work.  Post back if you have 
specific questions.

-- 
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"PieterLinden via AccessMonster.com" wrote:

> Associates wrote:
> >Hi,
> >
> >I was wondering if i can get some help here. I have two different reports 
> >that i want to open when a user clicks a button to view the reports for 
> >printing. Is there any way of popping them up at the same time in VBA?
> >
> >Thank you in advance
> 
> Yes.  Call the DoCmd.OpenReport command twice... once with each report name.
> 
> -- 
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-modules/201003/1
> 
> .
> 
0
Utf
3/30/2010 1:51:01 PM
Thank you all for your replies.

It works now. 

Thanks

"ryguy7272" wrote:

> http://www.fontstuff.com/access/acctut19.htm
> Go to the bottom of the page and download the sample.
> 
> Open the DB and hit Alt+F11.  Double-click on the form named 
> 'Form_frmReportFilter1' and you will see the VBA code.  
> 
> Replace this:
>     If SysCmd(acSysCmdGetObjectState, acReport, "rptStaff") <> 
> acObjStateOpen Then
>         MsgBox "You must open the report first."
>         Exit Sub
>     End If
> 
> With this:
>     If SysCmd(acSysCmdGetObjectState, acReport, "rptStaff") = acObjStateOpen 
> Then
>         DoCmd.Close acReport, "rptStaff"
>     End If
>     
>     DoCmd.OpenReport "rptStaff", acViewPreview
> 
> Close, Save, Run.
> 
> That's an excellent example of how these things work.  Post back if you have 
> specific questions.
> 
> -- 
> Ryan---
> If this information was helpful, please indicate this by clicking ''Yes''.
> 
> 
> "PieterLinden via AccessMonster.com" wrote:
> 
> > Associates wrote:
> > >Hi,
> > >
> > >I was wondering if i can get some help here. I have two different reports 
> > >that i want to open when a user clicks a button to view the reports for 
> > >printing. Is there any way of popping them up at the same time in VBA?
> > >
> > >Thank you in advance
> > 
> > Yes.  Call the DoCmd.OpenReport command twice... once with each report name.
> > 
> > -- 
> > Message posted via AccessMonster.com
> > http://www.accessmonster.com/Uwe/Forums.aspx/access-modules/201003/1
> > 
> > .
> > 
0
Utf
3/31/2010 12:55:01 AM
high quality Soccer jerseys NBA Jersey tracksuit and jackets, GHD 
hairstraightener supplier from www.willpa.com

Are you a Retail businessman who bother by the purchase price?  China 
Cheapest TOP wholesale website can help you

we are specialize in replica sport goods manufacturing in china, we can 
offer you all kinds of soccer jersey, NBA jersey,shoes and so on. they are 
the best brand replica goods whih are look the same as the original goods. 
excellent quality and steady supply for them. we have been marketed in Europe 
and American for 3 year. all the goods we offer are AAA quality.  our soccer 
jersey are Thailand style. If any goods you buy from my company have problem, 
we will refund or resend them again. Most of ourProducts have no minimum 
order requirements,soyou can shop retail goods at wholesale prices. if you 
can buy more than 300usd. We offer free shipping. The more you buy the more 
discount for you.

National soccer jerseys: http://www.willpa.com
Club soccer jerseys: http://www.willpa.com
NBA Jerseys: http://www.willpa.com
T-shirt and shirt: http://www.willpa.com
Tracksuit: http://www.willpa.com
Hoody & Jackets: http://www.willpa.com
UGG boots: http://www.willpa.com
Hair style: http://www.willpa.com
shopping Index: http://www.willpa.com

EMS shipping.  7days arrive, paypal accept

want more information pls contact us or check our website: www.willpa.com
0
Utf
3/31/2010 8:39:03 PM
Reply:

Similar Artilces:

HTTP Error 401.3
Hi, I hope someone can help me. CRM worked fine for a while, but suddenly everybody, except the CRMAdmin account gets the following error: HTTP Error 401.3 - Unauthorized: Access is denied due to an ACL set on the requested resource. The website is runnning on SBS2003 and i created the website myself before installing CRM. The folder where the webdata is stored is :\inetpub\MSCRM IUSR account does have the right permissions.. I cannot find any messages in the IIS website logfile I found some articles about this error, but i do not know where to start because they assume you have the w...

Msg Box when opening
This morning when while selecting files for back the power went out. It came back on in 20 mins or so. I rebooted backed up the files now Access says something about file is more than 256 characters...also Excel and Word won't let me save...says I don't have permission...change permissions and still doesn't work. My questions 1. what is the best way to BU Access db 2. what could I have done Depends upon your version. Some later versions have a built-in backup capability. I use external hard drives to back up all my files. mot just Access. -- Arvin Meyer, MCP, MV...

Reply to emails with different address
Hello, In our company we have one user who has 2 email addresses 1) <user name>@(domain).com. The user also has a secondary smtp address which is hr @domain.com. when the user responds to those emails she wants the from feild to reflect the hr@domain.com address and not the primary smtp address. Im sure there is a simple answer I just dont know it. Thanks for any help you will need to either create separate mailboxes for each address or maybe look at a solution like this: http://www.ivasoft.biz/choosefrom.shtml -- Susan Conkey [MVP] "kammtech" <kammtech@discussions...

database takes too long to open
Hi, I have a customer that has a problem with his exchange server, the outlook users takes longer than usual to start opening their mailboxes, and when I open the mailbox store, it also takes longer than usual (about a minute or 2). I recently found out that the ExchangeAL was not finding a DC, becuase it was incorrecly configured on the RUS, I fixed that, I also made an offline defragmentation of the database and checked its integrity using isinteg, and everything is fine. I don´t know what maybe wrong with it, but it´s making the users upset that the outlooks takes so long t...

Outlook Web Access attachment problem
We have a program that will generate a .snp file and then email it to whatever recipient it needs to go to. If they receive the email in Outlook it will allow them to open the file properly with the Snapshot viewer. However, if they go to the same email in OWA and try to save the attachment, it attempts to save it as an .mdb file. Why would OWA ignore the original extension and try to give it a different one? "Joe Giddings" <j_nospam_giddings@thehammocksource.com> wrote in news:jI9gd.11726$ta5.6952@newsread3.news.atl.earthlink.net: > We have a program that will genera...

Trial Media to Open License.
Well, i just found out that open media was not ordered for a job we are doing now. So i have a question. I have read on a few different sites that you can download SBS2008 PREM. Trial and enter your open license key later to convert to a running server. I called MS and they could not confirm or deny that it works. They can't find anything that says it will not work, but in the same time they can not find anything that it will work. Any First Hand experience doing this? If it does work, any gotchas? NOTE: I did order the media, it just will not be here in time. AND th...

Users asked to enter Username / Password /Domain when opening outl
Just this morning, our users are being asked for their username / domain and password. When we eneter it in, the box reappearas after we eneter it again we get and error that the information store could not be opened. We are running Exchanage 5.5 with Windows 2000. Any help would be great. Thanks in advance =?Utf-8?B?SmVmZg==?= <Jeff@discussions.microsoft.com> wrote in news:DD28037B-B6C8-4575-B0CC-F80C14991716@microsoft.com: > Just this morning, our users are being asked for their username / > domain and password. When we eneter it in, the box reappearas after we > eneter...

URL access
Is URL access possible in a view of "account" in CRM3.0? In addition, can you hand search condition? Hello, I searched the SDK for this, but only found out about URL addressable forms. Seems to me like you have to write a custom ASP.NET web application (grid) to write this behavior. Anyone else? Best regards, Merijn van Mourik "a-kun" wrote: > Is URL access possible in a view of "account" in CRM3.0? > In addition, can you hand search condition? ...

With a Query in Access 2007, How can I Create This Query
I need a query that will list all records in table 1 for which there are no auditor records (Table 3). Somehow, I need to use the relationship between tables 2 and 3 to find what's not in table 1. The following query gives me a list of all records that do have auditor records. I'm at a dead end on this one. Query SELECT PTOTNamesTbl.PTOTAuditingTherapist, PTOTAuditingTherapist.PTOTFirstName, PTOTAuditingTherapist.PTOTLastName, AuditDetailInitialEval.TherapistLastName, PTOTNamesTbl.PTOTFirstName, PTOTNamesTbl.PTOTLastName, AuditDetailInitialEval.Medicare, AuditDet...

Line Graph with two different data points
Hello, I am trying to create a line chart with numbers from my product Vs a competitor. The problem i am having is how can i make a chart that will have four data points comparing to each other? For example Product A- 1.5 1.2 1.6 1.8 Product B- 2.0 1.1 1.2 1.3 Product A- 70% 20 % 30% 67% Product B- 65% 30% 65% 55% How do i get all of these numbers on one chart? Is a line chart correct. I want to see these numbers compared?? Thank you so much Hi, Since the number don't appear related to the percentages you might plot them on the same chart but two different axes. If they were relate...

keeping page, insert etc dropdowns open & having page below it
how can i keep the drop downs open & have the page below it. It was that way & I must have hit the wrong button or something.microsoft word 2007 "billy" <billy@discussions.microsoft.com> wrote in message news:91198FA1-A43C-4A00-9141-FB019528AC5B@microsoft.com... > how can i keep the drop downs open & have the page below it. It was that > way > & I must have hit the wrong button or something.microsoft word 2007 Ask in a discussion group for Word. Here's how to find it. http://www.microsoft.com/communities/newsgroups/en-us/ In the...

lotus approach queries VS access queries.
Hi, We are migrationg from approach to access. My basic underastanding of the procedure is that the data has to be migrated and all the other features like forms and reports have to be recreated. Is 'Approach query' different from MS Access query? Can this be assumed to be replaced by Access query? cheers, Nuti ...

Access 2007 combobox will not "Auto expand"
I have a database converted from access 2003 to 2007. Now ALL comboxes will not allow the "autoexpand" functionality. Obviously I set this property to yes (both in the properties window AND programmatically). Most, but not all, of the comboboxes are populated by queries on ODBC coupled MSSQL tables. Again, in 2003, this worked fine. Anybody an idea ? Thanks in advance for any suggestions, Jos --------------= Posted using GrabIt =---------------- ------= Binary Usenet downloading made easy =--------- -= Get GrabIt for free from http://www.shemes.com/ =- ...

Excel 2000/Change Default Opening Location?
I'm using Excel 2000. When I open Excel, and the click on the Open button to open worksheet, it goes to a default location I'd like to change. How can I change that default location? I have searched under Tools > Options, but find no means there. Thanks. -- ---------- CWLee Former slayer of dragons; practice now limited to sacred cows. Believing we should hire for quality, not quotas, and promote for performance, not preferences. Tools|Options|General Tab change the entry in the Default File Location box CWLee wrote: > > I'm using Excel 2000. When I open...

odbc connection with access comma is not showing
I have made a ODBC connection between NAVISION and Access. When I run the query a number "23" shows up as "2300000". I think the comma is not showing maybe because of setting problem. I do not know how to fix this. In the Navsion database figures are correct. sounds like a ODBC driver problem. Probably due to precision see http://dynamicsuser.net/forums/t/6072.aspx Pieter "Remko Strik" <Remko Strik@discussions.microsoft.com> wrote in message news:F83F3871-DDCB-44E7-BC50-6CAD87659284@microsoft.com... >I have made a ODBC connection between NAVISION ...

Open 2003 files with 2007
Hello all, I just upgraded my Office 2003 with Office 2007 on an EP Pro machine. The only snaffoo I find(so far..) is with Excel 2007. When I double-click on an Excel 2003 file, Excel 2007 starts up just fine, BUT my file is not displayed. At that point if I click the Restore button up at top-right, the file appears when Excel is restored up or down, then all is well. Anyone have any idea whats up with that and how to fix it??? Thanks John Lots of people have complained that when they doubleclick on a file in windows explorer, that the workbook doesn't seem to show up in xl20...

Radio Button on opening the form
Hello: I have know how to open the form using command button, but now I want to use Radio Option button to open the form consists of: 1. Show all supplier invoices 2. Show only outstanding invoices 3. Show only paid invoices I have created 3 types of Form using 3 types of query, and now I want to open it by using radio button with the button OK and cancel to open the form. Is there any website providing the sample of Radio button to opent the form. I want to studdy how to write the VBA for that. Thanks in advance. Frank You sure you want the form to open when the radio button is sel...

how do I open excel workbook If i forget my workbook password
I made programm with a lot of formuals so I've put password on the workbook, because I did not wanted to earase formulas accidently,but now I can't open it because I forget the password. Thanks for help Hi search Google for 'Excel password remover' -- Regards Frank Kabel Frankfurt, Germany "av8rart" <av8rart@discussions.microsoft.com> schrieb im Newsbeitrag news:D2443918-FEF4-41E6-92C4-9B19A293778A@microsoft.com... > I made programm with a lot of formuals so I've put password on the workbook, >...

Report of Employees not paid
What do you think would be the easiest way to generate a report for a pay period showing anyone who had not been paid that pay period--like a payroll exception report for anyone with wages = 0 for a given pay period. Thanks! -- Debbie from Wipfli It's easy to do outside of GP. If you had MS Access or can write a SQL query in SQL Server Query Analyzer, you join the Employee Master table (UPR00100) with the Check History Table (UPR30100) but restrict it to where the values in the joined fields in the Check History table are null. MS Access has a wizard that will create the query for...

Date format in a report
The date is formatted in my table in yyyy/mmm/dd. In one report I need to run for another organization the format needs to be in dd/mmm/yyyy format. How can I change the way it displays in the report? I do not want to change it in the table as I generally want the format to be yyyy/mmm/dd. -- Charlie You can simply use either the format property for the control or you can use the Format() if you need to set the format to something that doesn't already exist. Format([YourDataFieldName],"dd/mmm/yyyy") -- Hope this helps, Daniel Pineault http://www.carda...

Report Detail section coding
Is there a way I can know when the detail section of report moves to the first record of a new group. Something like..... If Me.DetailSection.BOF Then I am using Access 2007 Any help is always appreciated. Thanks, Wally wallymeister wrote: >Is there a way I can know when the detail section of report moves to the >first record of a new group. Something like..... > >If Me.DetailSection.BOF Then > >I am using Access 2007 Add a text box to the detail section and set its expression to =1 and RunningSum property to Over Group. The value of the te...

Report repeats a field
Example: John Smith 2,14 5,27 3,18 John Smith 3,17 4,27 7,34 John Smith 1,22 6,57 8,92 I want that the report shows a name(John Smith) only one time like this: John Smith 2,14 5,27 3,18 3,17 4,27 7,34 1,22 6,57 8,92 The report get the informations from a Query that get the information from a table. One way to do this would be to set the "name" control's Hide Duplicates property to Yes. Another way to do this would be to use Sorting & Grouping, then Gro...

How do I open or cancel "previous appointment"?
Using 2007 version, small vertical bar running down lhs side of calendar (just to right of times) for selected date, inside bar is written "previous appointment" , cannot open or delete, cannot insert new appointment in that time frame...anybody else hit this wall? Cannot be an appointment since never used this %$#(&^ programme before. Tnx r2p2 "r2p2" <r2p2@discussions.microsoft.com> wrote in message news:E0E9D6ED-09A3-4235-8B14-652FF43F430A@microsoft.com... > Using 2007 version, small vertical bar running down lhs side of calendar > (just...

Linked Table Manager Doesn't Work in Access 2003
I recently upgraded to Access 2003 and have found that the menu option: Tools/Database Utilities/Linked Table Manager no longer works correctly for re-linking my front end database to the backend. No tables show in the table list. If I click “Select All” and then fill in the path to the backend database I get the following error message: Method ‘List’ of object ‘IfieldListWnd’ failed. As a work around I have to delete all the table links from the front-end and then File/Get External Data/Link Tables. Is anybody else having this problem? Thanks in advance for your help. "...

Access violation in CDaoQueryDef::Open or CSimpleStringT::GetLength(). VC++ 6.0 app compiled in Visual C++ .NET
Hi, I have a problem using DAO in Visual C++ .net Standard edition. We have an old project created in Visual C++ 6.0 Professional. The projects compiles, links ok (with a lot of warnings telling the DAO-classes are deprecated). The compiled program executes ok until I am about to access the database. Some accesses goes ok, but some are not. It is always the same databse accesses that the program crashes on. The database that I'm using is Access 97. I also have tried converting it to 2000 and 2002. In this function the crash occurs in daocore.cpp: void CDaoQueryDef::Open(LPCTSTR lpszName...