473,769 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Maximizing Access Report From VB

This is my first try at running Access Report by Visual Basic

I have the following code in my button press event:

' 2 - Show print preview
objAccess.DoCmd .OpenReport "Invoices", 2, ,
"[Invoice_Summary].[InvoiceNumber]=" & _
intCurrentInvoi ce

objAccess.DoCmd .Maximize
The result is that the Access application is not maximized but the
report inside it is. The application takes up about two thirds of the
screen. Then, if I maximize the application window, everything is
fine.

I would like everything to be max when the user sees it.

How can I maximize the Access application as well as the report inside
it.

Thanks.

Bill
Jan 7 '06 #1
3 3714
Newbie wrote:
This is my first try at running Access Report by Visual Basic

I have the following code in my button press event:

' 2 - Show print preview
objAccess.DoCmd .OpenReport "Invoices", 2, ,
"[Invoice_Summary].[InvoiceNumber]=" & _
intCurrentInvoi ce

objAccess.DoCmd .Maximize
The result is that the Access application is not maximized but the
report inside it is. The application takes up about two thirds of the
screen. Then, if I maximize the application window, everything is
fine.

I would like everything to be max when the user sees it.

How can I maximize the Access application as well as the report inside
it.

Thanks.

Bill


Howody, to all the others in this crosspost. Anyway....

Normally, in the Access Report's OnOpen event I have the following line
DoCmd.Maximize
if I want to open the report maximized.

I don't know if this will help you but....
http://www.mvps.org/access/api/api0018.htm

This shows how to open an app in min/max/normal modes using an API call.
I don't see you opening the app anywhere, but if the app is opened in
a maximized state, I'm sure the report would be displayed correctly in a
maximized state. Maybe you need to do something with a WinAPI call.

Also, check out Shell() in VB. It too has a window state to open an app
in the window style you specify.

Jan 7 '06 #2
On Sat, 07 Jan 2006 05:00:08 GMT, salad <oi*@vinegar.co m> wrote:
Howody, to all the others in this crosspost. Anyway....


What's wrong with posting to more than one group as long as it's on
the same message?

Thanks for your answer to my question. It was very helpful.
Jan 7 '06 #3
Newbie wrote:
What's wrong with posting to more than one group as long as it's on
the same message?


Hi there,

There's nothing wrong with doing so. However, if you are talking about
Access and are doing your work in it, you're using VBA, not VB, which
would make the two vb groups not really relevant to your question.

8)
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
Jan 7 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
23877
by: Nicola | last post by:
Hi Everyone, I am new to programming and would like to know how to open an access Report from within vb 6. I am trying to write a program to organise cross stitch threads. I have found out how to use a database table but all I want to do now is to click a command button to display this access report. Any suggestions please ?????
7
8869
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I want my users to be able to select a report, click on a command button on a form, which will then automatically create the report as a pdf file and save it to the user's machine. I am using Adobe Acrobat (5.0 I think) and have Adobe Distiller as a
11
6600
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on where the job is running, the job runs sucessfully, PDF files got generated, everything is good. If I scheduled the job to run at the time that I am not logged into the server, Access is not able to print to the printer. The error is pretty...
2
14129
by: Dean Slindee | last post by:
Anybody written code in VB.NET to: 1) show a print preview window of reports already written and stored in an Access 2002 database; or 2) execute the print of a report stored in an Access 2002 database? Thanks, Dean Slindee
6
3679
by: Bob Alston | last post by:
I am looking for Access reporting add-in that would be easy to use by end users. My key focus is on selection criteria. I am very happy with the Access report writer capabilities. As far as development of reports, it is certainly fine in my book. But for end-users, with little experience or training, it would be nice to have an easy way to handle various selection criteria, perhaps with relatively stock reports. I see easy to use by...
3
2176
by: stan | last post by:
I have code that produces 5 boxes across the screen width. So far I have only tested it in IE 6 and NS 8. It works in IE, but in NS I am not able to fit in the 5th box. I am using two different style sheets, one for IE and on e for NS. The box widths are set to 20%. I would appreciate suggestions on how to get the 5 boxes to fit the screen
2
9349
by: amith.srinivas | last post by:
Hi all, From a word macro in VBA, I am trying to create a report in access DB. The report is based on a query with a parameter. I am using Set rpt = Application.CreateReport rpt.RecordSource = <<Query_Name>> Once I create the report, I m trying to create labels to display the Report title in the Report Header section.
3
2467
by: x taol | last post by:
when the specific mdb file be opend, i want to open maximize the aceess db. and maximizebox is disabled. *** Sent via Developersdex http://www.developersdex.com ***
2
3592
by: Quiver | last post by:
How do you stop a form from maximizing on open. When I close a report, I want "frmMAIN" to open at it's normal non-maximized size. But, it keeps opening fully maximized. Here is my code. Private Sub Report_Close() On Error GoTo Err_Report_Close DoCmd.OpenForm "frmMAIN" Exit_Report_Close: Exit Sub Err_Report_Close:
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10212
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10047
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9995
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7410
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6674
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3962
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3563
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.