Modules & VBA :: Formatting Page Layout (Margins / Orientation)

Mar 21, 2014

I have the following code in a module to set certain formatting properties when exporting an Access 2010 query to Excel:

With xlApp
.Application.Sheets("Spoilage").Select
.Application.Cells.Select
.Application.Selection.ClearFormats
.Application.Range("A1:K1").Select
.Application.Selection.Font.Bold = True

[code]....

This works perfect but now I need to set some of the page layout properties (margins, orientation, etc.)

I have tried adding this:

With ActiveSheet.PageSetup
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(0.75)
.BottomMargin = Application.InchesToPoints(0.75)
.Orientation = xlPortrait
.PaperSize = xlPaperA4
End With

But I get a complie error (Method or data member not found) on the .InchesToPoints part of the line.

But I get a complie error (Method or data member not found) on the .InchesToPoints part of the line.

View Replies


ADVERTISEMENT

!@#$ Page Margins ...

Mar 27, 2006

I have an Access 97 reporting DB.

On all other systems these reports print out fine.

I just set up this reporting system on a new computer and when I print, the reports print on two pages - second page had a tid bit of an order date.

On the other systems, all the page margins ( top, bottom, left & right ) are set to .25" and the column width is set to 8".

I also receive this message upon running the report:
The section width is greater then the page width, and there are no items in the additional space, so some pages may be blank.

If I manually move this Order Date field over it does not properly print in the Order Date box on the form fed document.

This report is printed to a OKI Microline 320 Turbo 9 pin dot matrix printer.

All my margins are at .25" EXCEPT for the right margin, which is at .416" ... WHICH I AM UNABLE TO CHANGE!! Why?

I have reinstalled the proper drivers for this printer and have up to Office SR-2 installed.

Why am I unable to change the right margin to .25", if all the other systems have this setting?

Any suggestions are muchly appreciated, as I am seriously frustrated with this situation .... if I have left out any pertinent info .. please send your questions my way ....

Cheers!
QT

View 2 Replies View Related

Reports :: Different Report Margins On First Page?

Dec 30, 2013

I'm using Access 2003.

Is it possible to set the top margin on the first page of an Access report different from all the other pages?

View 10 Replies View Related

Is It Possible To Automatically Set The Report Page Margins (top, Buttom,left, Right)

Aug 19, 2007

IS IT POSSIBLE TO AUTOMATICALLY SET THE REPORT PAGE MARGINS (TOP, BUTTOM,LEFT, RIGHT) at the Report Open event?

View 3 Replies View Related

Modules & VBA :: Conditional Formatting After Page Break

Jan 13, 2014

Is it possible to do conditional formating after a page break?

I have been given someone elses mess to clean up. It is a massive procedure which runs dozens of queries, then formats the results and pastes them into a word file at given bookmarks

For most tables there is one record for each lake. However there are several where many entries per lake. The logic being applied is that the font colour for the column is made white, then for each first instance of a lake name the font colour for that cell is made black again.

The problem is there are many times were the first row of data on a new page is not the first record for a particular lake making the reader have to flip back to the previous page to double check which lake they are looking at data for.

So what I want to do is leave the existing logic, and just add turning additional cell's (Column 1, after a page break) font colour back to black.

View 3 Replies View Related

Queries :: Export Data With Formatting And Layout Using Form

Jun 24, 2013

Export Query Data with Formatting and Layout Using A Button On Form Before Or After DoCmd.TransferSpreadsheet

View 4 Replies View Related

Report: Formatting To Fit 1/3 Page Three Times

Aug 18, 2006

I need to print data on a pre-printed letter-sized piece of paper that will be cut horizontally into three identical 8.5" x 3.667" forms.

For the life of me, I cannot figure out how to format a report to get the data in the right spots. I've tried messing with the margins, height of the detail area, columns...everything I can think of. It seems I can get the data to print in the right spot on the top form but neither of the other forms and/or on the top two but not on the bottom at all.

There *must* be a way to do this.

View 3 Replies View Related

Edit Switchboard Page Formatting Independently

Oct 6, 2011

Is it possible to change the formatting on different switchboard pages? For example, if I want to use a different color scheme on different pages of the same switchboard. So far, it seems like the changes you make to the switchboard design apply to all pages. Any way to change this?

View 1 Replies View Related

Modules & VBA :: Disable Design / Layout View

Apr 19, 2015

I am working on adding a layer of security to my current DB. I've got usernames and passwords set up, along with access info (controlling what aspects of my DB certain users are able to interact with)....

I've managed to disable the navigation pane and ribbon for most users (only me and another user will have access) and now i want to try and disable editing....

Cannot find any VBA coding online to allow me to prevent people from editing forms/reports/queries in Design or Layout view.... How this can be accomplished?

View 2 Replies View Related

Snapshot Viewer Orientation

Aug 28, 2006

Wonder whether anyone can help me?

Each day I produce reports from access and email then out using the snapshot viewer format. The majority of recipients open this find and the report is absolutely fine, however, when other recipients open the report it comes out all slanted and blurred. It almost looks like there snapshot viewer is squashing a landscape report into a portrait view. Does anyone know how to correct this, as its driving me mad trying to find an answer?

thanks:)

View 1 Replies View Related

Change Of Orientation Within A Report Pages.

Nov 3, 2006

Hi,

Is there any way to change orientation of report in report footer? I mean, I want to produce report header, detail etc in landscape and after detail I have given page break, at last page only report footer should be in portrait.

Rahul

View 3 Replies View Related

Vertical Text Direction/Orientation In CrossTab Query

Jan 7, 2007

I am fairly new to developing with Access.

I would really value some advice on changing text direction in crosstab query column labels.

I have just created a crosstab query to function as a training matrix. It has rather long column labels (there are good practical reasons for this), which makes the query very wide and difficult to print one one page.

Is there a way to change the text direction of the column headings so they are printed running up the page?

I know how to change text direction in Word or Excel, but not Access.

At the moment I am copying the query results into Excel and manipulating the text direction in Excel, but this is rather cumbersome.

Thanks in anticipation of any help. :cool:

View 3 Replies View Related

Forms :: Three-Level Navigation Form - First Two In Horizontal And Third In Vertical Orientation

Sep 20, 2014

How to Creating a Three-Level Navigation Form, First and second level must be in horizontal orientation, third level desirable be to vertical orientation and dependent of level 2.

View 1 Replies View Related

How To Set Margins In Combo Box

May 4, 2005

I have set individual margins inside text boxes in my app.

I want to set some white space inside the combo boxes, too, but that option isn't available in properties.

Is there a straightforward way to set inside margins on combo boxes?

Thanks in advance!

View 2 Replies View Related

I Keep Losing My Margins

Aug 18, 2006

Hi Everyone

I wonder if anyone can help me please.

I have a form that nearly fills an a4 sheet of paper when printed. For this reason I have to set the margins from 24.99 down to 5.

This is ok and the form works well and prints out properly about 75% of the time. Occasionaly when I open the form it has reverted back to the 24.99 margins which of course prints out on three sheets of paper and is all over the place.

Is ther a way to set the margins on load and can anyone suggest an appropriate bit of code.

Kindest regards

Tony

View 4 Replies View Related

Can You Automatically Set A Forms's Margins In A2k.

Jan 19, 2006

I want to print a page with .5 magin instead of the typical 1 inch. I am using access 2000, so i can not use printer.leftmargin. Is there a way i can do this through code somehow instead of going into page setup on each users computer? If the page margin is set to larger than 1" it will print on 2 pages.

Anyone have any suggestions on whare to start? All i can find is how to adjust page margins in a report. Or with a later version of access.

View 3 Replies View Related

Report Margins (Print Position)

Feb 6, 2008

Good morning all.

I have an annoyance!!! I have a few reports in the access database that I'd like to hard code the print margins so that when I send any database updates to users that have different printers, the margins all come out the same. So that I don't have to then go to each computer I've updated the database on, to open each report and reset the correct print margins.

Another annoyance - along the same lines: A report that previews correctly several times and then - for no reason, previews with larger margins and, hence, data is lost off the right.

Any suggestions would be appreciated.

Thanks
Martin

View 1 Replies View Related

Reports :: Margins Change Between Computers

Apr 1, 2014

I design/maintain an Access database for a friend's business using my home computer. The printer he uses allows for much smaller margins than mine does, so anytime I edit a specific report that uses very small margins, my computer automatically increases them to the minimum margins my printer allows and when the business owner runs the report on his computer it spills on to extra pages.

Right now every time I make a change, I need to go directly to his computer and adjust the margins within the report after the new front end is uploaded.Is there any way around this, such as telling Access to ignore the printer's minimum margins?

View 3 Replies View Related

Reports :: Setting Margins To Print Labels

Jul 11, 2015

I am having a problem setting the margins to print labels in access. I go to page setup and change the margin size click ok and nothing happens to the label and when I go back to page setup the margins have returned to their original values. I have already selected the label printer and labels that im using.So im baffled as to why it wont accept margin values that don't cause the label to be printed over 3 labels.

View 1 Replies View Related

Reports :: Can Report / Printer Margins Be Changed At Runtime

Nov 10, 2013

Access 2007 RUNTIME.I have 2 different printers, 1 for invoices A5 & one for general use A4.

I use

[URL]

and can change printers & some stuff but can't change margins.

Is there a way to change these margins via VBA that can be set in RUNTIME.

Like now, I have just had thousands of invoices pre-printed layout but the company managed to move the margin 5mm over so I have to program my MDB reports to reflect that.

View 3 Replies View Related

Modules & VBA :: Add Page Number To Header?

May 16, 2015

I'm using VBA to insert the page number in a header. It's working, exept for a couple of things. I want it to insert the page number at the current position, and restart numbering at each section. I increment the section # with the variable x. Currently, it's inserting the page number at top-left of header. I want it to insert the page number after the word "Page" followed by 2 lines breaks.

Here's snippet of my code:

'Create Header
With ActiveDocument.Sections(x)
.Headers(wdHeaderFooterPrimary).LinkToPrevious = False
.PageSetup.DifferentFirstPageHeaderFooter = True
.Headers(wdHeaderFooterPrimary).Range.Font.Size = 9
.Headers(wdHeaderFooterPrimary).Range.Text = "Session: [" & rst!SessionNum & "] " & rst!SessionTitle & _
Chr(13) & "Presenter: " & rst!Full_Name & Chr(13) & "Page " & Chr(13) & Chr(13)
.Headers(wdHeaderFooterPrimary).PageNumbers.Add pagenumberalignment:=wdAlignPageNumberLeft, FirstPage:=True
End With

View 5 Replies View Related

Modules & VBA :: Formatting A Sheet After Export From Access

Sep 16, 2013

I have a button on a access database form that runs a query and exports the data to an excel sheet that remains open. I am ok with this. What I would like to do now is format the sheet and then save it as a file name that is the same as the query name but adding the date at the end. Here is what I have so far:

Private Sub Command1_Click()
On Error GoTo Err_Command1_Click
Dim stDocName As String
stDocName = "Qry_SentForProcessing"
DoCmd.OpenQuery stDocName, acNormal, acEdit
DoCmd.RunSavedImportExport "Export-Qry_SentForProcessing"

[code]....

I just want to add the code to this button. Or do I need to write a function as a module, then call the function after the export is run.

View 1 Replies View Related

Modules & VBA :: Formatting Cells In Excel Spreadsheet

Aug 18, 2014

I am using Access 2010 . I need to format cells inside the Excel spreadsheet

Here is my code:

Dim ApXL As Object
Dim xlWBk As Object
Dim xlWSh As Object
Dim intColumn As Long

Set ApXL = CreateObject("Excel.Application")

[Code] .....

The code "With xlWSh.Selection" returns a run-time error 438 - Object does not support this property or method

When coding, when entering a "bang" ("."), Access normally returns the next piece of code. The code above does not! How to I correct this?

I do have a reference to Microsoft Excel 14.0 Object library....

View 3 Replies View Related

Modules & VBA :: Taking Data Form A Web Page

Aug 12, 2013

I am successfully using some code to open a web page and log in for me.

Code:

Dim ieApp As InternetExplorer
Set ieApp = New InternetExplorer
ieApp.visible = True

[Code] ....

The bit I am really stuck on and still after reading various posts and googling I cannot seem to get a bit of code to read a value from the web page.

<tableborder="0"cellpadding="0"cellspacing="0"class="linktable">
<tr><thcolspan="2">Status</th></tr>
<tr><tdvalign="top"style="width: 50%">
<divclass="fieldset"id="general_info">

[code]...

View 4 Replies View Related

Modules & VBA :: How To Open Form With Page Up Screen

Dec 26, 2013

My form opening with page down screen, how could I open it with page up screen?

View 7 Replies View Related

Modules & VBA :: Conditional Form Formatting Depending On Field

Jul 2, 2013

I created a form that applies conditional formats depending on a field. It works fine, until you enter data into one of the conditionally formatted fields, then all hell breaks loose. Conditional formats totally go away and the cells go to #error.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved