473,372 Members | 819 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,372 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 3678
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.