Modules & VBA :: Automated Printer Selection And Page Setup?

Mar 7, 2014

Is it possible, within an OnOpen even of a specific report, to set the printer selection and page setup (size, margins, etc.) to certain things? If so, how would I go about accomplishing this?

I would like to do this for specific users within our domain (this I won't have any trouble with).

View Replies


ADVERTISEMENT

Hardcoding Page Setup

Mar 28, 2007

Hi all,

I opened my database on a newly installed access programme (same version) to notice that the design control page settings had reverted to default for all my forms and reports. I need them to be A4 and not letter when it is opened on any access system. How could I go about doing this? In Code?

Cheers

Tania

View 5 Replies View Related

Page Setup In Report

Jun 1, 2005

Hi
I have created some reports but find difficult to keep permanganate page set up for that reports. I go to design view and do page setup with required margin and Portrait or Landscape set up and preview that reports looks fine. After saving again I check still its fine but once I close that database and reopen again some of reports page setup becomes Portrait with 1" margin on all sides (Not All reports). I cannot solve this. Can any one help??
Funny part is even I copy that report and change data source of that report it changes page setup
:confused:

View 3 Replies View Related

Report Page Setup Keeps Changing

Jan 3, 2006

I have several reports in my system. Some are landscape and some are portrait. Occasionally the landcape ones switch to portrait taking up two pages each. In preview mode it is not so bad that the user can reset the page size, but when one is sent to print this is most certainly annoying.

Any advice?

View 3 Replies View Related

Report Automated "fit To Page"

Dec 23, 2004

Does anyone know what code or macro you could use to automatically zoom a report to "fit" the screen in the print preview state? Thanks in advance for any help!

View 2 Replies View Related

Modules & VBA :: Automated Caps In Code?

Jun 3, 2015

I am having a few issues with my module code in Access 2002. for some reason every time I write some code Access is automatically making the first letter a capital so for instance [Our Ref] should be [Our ref] but it simply will not let me do it!

Temp = rstHTML!html1 & rstProp![Our Ref] & rstHTML!html2 & rstProp![Our Ref] & rstHTML!html3 & rstProp![Property Title]

View 6 Replies View Related

How To Create A Summary Page Based On Selection

Sep 21, 2015

I created a database with a list of companies, with many details in separate tables linking them - shareholders, directors, address etc.

Now i want to create something where the user will be able to just Select the company, and the information would be shown below just for that company. I would want to design of course in order to appear nice.

View 10 Replies View Related

Modules & VBA :: Automated / Transparent Conversion In Text Box Control

Jun 10, 2014

I have a text box control in a form that is bound to a table field. The field is of numeric format that stores time duration in minutes. I would like to apply sort of transparent / automated conversion. It would work so follows:

- when someone read records, the text box would convert a integer number stored in the filed into text so that the text box would show the time duration in this form "HH:MM"
- when someone clicks on the text box to change the value, one would input the value in this form again "HH:MM" but the text would be converted to minutes and then stored in the database.

View 2 Replies View Related

Modules & VBA :: Select Printer To Use By Clicking On List

Nov 25, 2014

A while ago I started to use the following code to list the printers installed on a computer. This is code by Wayne Phillips.

This works well, but what if instead of simply getting a big message box with all the printers listed I wanted to be able to click on a name and set that printer? How do I do that?

Code for the button:

Private Sub cmdListPrinters_Click()
Dim strCount As String
Dim strMsg As String
Dim prtLoop As Printer
On Error GoTo ShowPrinters_Err

[Code] ....

View 2 Replies View Related

Modules & VBA :: Determine Which Printer Was Selected From The Print Dialog

Feb 10, 2015

This for an app being used in Access 2003. I'm trying to (sort of) automate naming a PDF report. After the user selects a printer from the print dialog, if the printer name is like "*PDF*" then I want to put the PDF file name in the clipboard so it can be quickly pasted in the file name of the PDF printer's save dialog.

Something like this:

Code:
Dim strSelectedPrinter as string
DoCmd.OpenReport "rpt1", acViewPreview
DoCmd.RunCommand acCmdPrint

[Code]....

but that returns the name of the default printer, not the selected printer.

View 6 Replies View Related

Modules & VBA :: Can't Print Form Image To This Type Of Printer

Jul 25, 2013

I have an application (2007 accde) that has been working for some time, this line specifically:

Application.FollowHyperlink Me.txtAttachment

On one users PC (XP Pro SP3), this has worked from day one. His PC got infected to the point that I had to wipe/rebuild it, and suddenly this code throws a warning and then an error. The warning I could live with (it's the MS Office "some files can contain viruses..." warning). However, after clicking on OK for the warning, I get an error that says "Can't print form image to this type of printer". Doesn't make sense, as this user has the same default printer he had before, plus I tried with a different default printer.

if I navigate to the file location on his PC I can open any of the files, so I don't think it's a permissions issue. The code works fine on my PC and a VM with a different OS, and it still works fine for other users.

View 6 Replies View Related

Modules & VBA :: Can Send A Report Directly To Printer From Code

May 19, 2014

Can you send a report directly to the printer? We have Clients with multiple Contact Notes, by multiple Clinicians, each of these are separate tables. Every month we print two reports for each client that had at least one contact in that date-range. Usually 200 clients, takes a lot of time. My approach so far is a query within a make-table query to get a list of unique client ID's that had one contact in the date-range. Then I use that table in code to create a recordset, use a Do Loop within that where I print the two reports for the 1st client, move to next record and loop. Now that I've got it working I'm not sure how to print all the reports My 1st question, can you send a report directly to the printer from code? The printer is a networked Konica Minolta Biz-hub so I think it can handle that many jobs being queued that fast.

View 4 Replies View Related

Modules & VBA :: Open Cash Drawers Attached To Receipt Printer EPSON T-20

Mar 24, 2014

We have an Access database that opened some cash drawers attached to the computer through USB and it is working perfectly. We have some of the cash drawers that are attached to the EPSON Receipt printer and we also want to open those Cash Drawers attached to the receipt printer. Looking for code to open the cash drawer attached to the receipt printer, Is there any command available that I could send to the receipt printer and it would open the Cash Drawer.

I have also taken the screenshot of the utility program that will show the information regarding the printer and I am very expecting to get this working soon as we have build the Microsoft Access database that would checking the cash drawer status and also open the USB cash drawers.

View 6 Replies View Related

Modules & VBA :: Database Setup - Send Email From Alternate Account

May 30, 2014

I currently have two e-mail accounts on my computer. One is my default e-mail address with my name on it. The other e-mail account is a generic account with the department name.

I have a database set up to generate and send e-mails to our technicians notifying them when an order they placed gets put on back order. This database could possibly send twenty or thirty e-mails out each time it is run. My manager has requested that the database send the e-mails from the generic e-mail account instead of the default account. That way, when the field replies to the e-mail, they won't bombard my account.

Is there a way to tell the database which e-mail account to send an e-mail from?

I am currently using the below module to send the e-mails:

Option Explicit
Dim appOutlook As Outlook.Application
Dim namespaceOutlook As Outlook.NameSpace
Sub Outlook_SendMail(sEmailAddr As String, sEmailSubj As String, sEmailBody As String, Optional sAttach1 As String, Optional sAttach2 As String)

[Code] ....

View 2 Replies View Related

Modules & VBA :: Listbox Setup With Option To Select Multiple Items

Jan 7, 2015

I am trying to set up a listbox with an option to select multiple items (I have done this and tested it with debug.print and it seems to work). I am then building a filter statement with VBA. I want to then use a button to add this statement to the filter in a subform with (a datasheet design), and then requery it.

My code below seems to be working in part. But I am getting all the items at times. Seems to work consistenly when selecting one item only, but I can't see anything wrong with my 'OR' statements when I debug.print.

Private Sub Command176_Click()
Dim i As Integer
Dim strFilter As String
Dim blnFirst As Boolean
i = 0
If Me.List163.ItemsSelected.Count = 0 Then

[Code] .....

View 3 Replies View Related

Modules & VBA :: Click Button Setup - Run A Query And Then Export As Fixed Width TXT File

Oct 15, 2014

Basically im trying to setup a click button that will export my query as a text file ( the text file will then be fixed width and i have already setup the specifications for this).

I think i get how to complete the export part as below

OutFilePath = "file location i want the data to be exported to"

DoCmd.TransferText acExportFixed, "Welcome output query Export Specification", WelcomeOutput, OutFilePath, True

I just dont know how to run the query and link it to the export.

View 2 Replies View Related

Modules & VBA :: Define And Setup Array - Find Respective Numbers For A Text String

Apr 21, 2015

I need to find the respective numbers for a textstring when for

abcdefghijkl stand the numbers
79 81 82 83 84 85 86 87 88 89 91 92

The textstring to "decode" is for example is 'adgjk'

The result (79 83 86 89 91) should be added into a table by Looping.

rs.Addnew
rs("Letter")= myarray??
rs("corNumber")= myarray?
rs.update
rs.movenext

Something like this.

But I cannot define and Setup the Array, which should be the best way for doing this.

The Array does not change its Content nor its Dimension.

Both, letters and numbers are strings.

View 14 Replies View Related

Modules & VBA :: Add CC Email Addresses Into Automated Email?

Aug 3, 2015

I have an automated email system (Lotus Notes) in a Access database I have created and am looking for the code needed to add up to 3 c.c addresses into an email prior to sending automatically.

The code I have to send the email to the To: individual is all working but what code I need to add and where for the c.c addresses of which there could be 1, 2 or 3. The control for To address is EmailTo = CustCopyEmail The controls for the 3 c.c emails are cc_EmailAddress, cc_EmailAddress1 and cc_EmailAddress2.

Here's the code I have:

Private Sub SEND_CC_Click()
' Set up the objects required for Automation into Lotus Notes.
Dim Maildb As Object 'The mail database.
Dim Session As Object 'The Lotus Notes session.
Dim MailDoc As Object 'The mail document itself.
Dim UserName As String 'The current users Lotus Notes name.

[code]....

View 8 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 :: 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

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 :: Last Selection List Box?

Apr 6, 2014

I have a form where I add a new event, and it gets added to a list box in another form, I was intending to select the most up-to-date record within the list box but it seems to keep selecting the old latest record and not the new record that ive added. I had tried to select the first record but then move to the last record hoping it would refresh but that still doesn't work.

This is the code I used below:-

Quote:

'Select last event record added to event list box
Me.lstPatientEvents = Me.lstPatientEvents.ItemData(Me.lstPatientEvents.L istCount - 1)
lstPatientEvents.Selected(lstPatientEvents.ListCou nt - 1) = True

View 1 Replies View Related

Modules & VBA :: Web Page Template - Adding Characters Before And After Sentence

May 6, 2014

I'm using Access to create some web page templates. To Do this I have a memo field called "Description" into which I'm entering text. Example:

This is an obvious description example

What I need to be able to do is put a "<p>" before each sentence and a "</p>" at the end of each sentence. Examle

<p>This is an obvious description example</p>

The information is stored in a form page, and the text have paragraphs.

View 1 Replies View Related

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 2 Replies View Related

Modules & VBA :: Find Text On Loaded HTML Page

May 5, 2015

I am simply trying to find text on a Web Browser Control htm page.

Using MS Access 2003, I have a form that includes the activeX Web Browser Control. On load of the form I initialize the web like below:

Code:
Dim strURL As String
strURL = "http://www.justice.gov/eoir/profcond/chart.htm"
Me.WebBrowser0.Navigate strURL
Me.WebBrowser0.Silent = True

The page loads fine.

Now, also, on my form is an unbound text box I call: [txtFind] and a command button I call [cmdFind]. I want [cmdFind] to find the first occurrence of the value in [txtFind]. My code below doesn't do anything when I click the [cmdFind] button.

Code:
Public oRange As Object
Public myfindFirst As Boolean
Public intTextLength As Long
Private Sub cmdFind_Click()
Dim sSearch As String
Dim strText As String

[Code] .....

View 9 Replies View Related







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