473,396 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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]=" & _
intCurrentInvoice

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 3679
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]=" & _
intCurrentInvoice

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.com> 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
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...
7
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...
11
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...
2
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...
6
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...
3
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...
2
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 =...
3
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
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. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.