Print Current Record - Open Printer Dialog Box

May 19, 2014

I want to put a print button on my data entry form that prints the current record in a report that is laid out all nice and pretty. I found this code that works, but it goes straight to the printer - it does not bring up the printer dialog so you can select a printer.

Code:
Private Sub RecordPrint_Click()
Dim strWhere As String
If Me.Dirty Then
Me.Dirty = False
End If

[Code] ....

How do I get it to bring up the printer dialog?

View Replies


ADVERTISEMENT

Printer Dialog Box Before PRINT

Nov 15, 2006

Hi,

I used the code below to hide all the toolbars and then created my custom ReportToolbar so the user can print the report. All works OK; however, the PRINT button on my custom toolbar sends the report imidiately to the printer. How can I create a button that I could add to my custom toolbox which would open the dialog box that allows to choose the printer, number of pages to print, etc.. (same action as I can get by going to File->Print)?

PS> Also, is there any way to remove the drop down arrow from my custom toolbox? I disabled Customize Toolbox but the pulldown arrow still appears. I found making an MDE would take care of this, but was wondering if there was another solution.

Code used to hide toolbars:For i = 1 To CommandBars.Count
CommandBars(i).Enabled = False
Next i

View 3 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

General :: Button On Form To Print Current Record - Open Preview Before Printing?

Sep 11, 2013

I have a button on a FORM to print the current record with the following code:

DoCmd.RunCommand acCmdSelectRecord
DoCmd.PrintOut acSelection

But what I need is that before printing, open the preview to set the margins and page size ... or at least to pre-configure so that when you press the button, and comes preformatted.

View 2 Replies View Related

I Want To Print A Report And Programmatically Set The Printer Name And 'Print To File

Jul 16, 2007

How can I print a report and at the same time programatically set the printer name and 'Print to File' option and set the path of this option?

View 1 Replies View Related

Reports :: How To Automate Select Printer Without Using Dialog Box

Jul 16, 2013

I have a database with a mail label printer and another printer attached to the computer. I would like the user to hit the command button for each of the printers and have the selected data printed without having to select which printer to use each time.

Note: Printer "set up" doesn't work, even when form is in design view, because after print is done, back to dialogue box when trying to print the next time.

View 2 Replies View Related

How To Open A Dialog Box To Move Files Inside A Folder That Is Setup As Current Folder

Sep 2, 2015

I'm trying to automate a process of selecting a set of file/s and move them in a folder. When I click on a button, it should open a current folder that is setup in the code.

Lets say that I have a folder C:documents est, and very time I click on the button, it should open the dialog box with that path so I can select the files from another folder, drag them there and they will be saved in that folder.

This will form part of wider automation that will send an email stating that those file/s where placed in that folder.

I have in the same form where the button is placed, 3 check boxes that needs to be passed to the email as well that one or all the files where placed in the folder.

View 10 Replies View Related

Reports :: Unbound Report - Print Preview OK But None Of Fields Print When Report Directly Send To Printer

May 25, 2013

I have an unbound form with an associated report. When the user hits the 'print' button on the form/screen, the report is launched in the background. In the On Load event of the report I populate the report fields from the forms field as so:

Code:
Me.txtAddrMainLine2 = "NAME " & UCase([Forms]![frm_OrderRx].[txtPatientName])

This works like a charm as long as I call the report in Print Preview mode (i.e. with acViewPreview). But if I send the report directly to the printer, none of the fields print.

I've read about using other report events to populate the fields (e.g., On Format and On Print) and also something about using TempVars to pass the data. But I haven't read anything that's clear and definitive about the full answer.

View 3 Replies View Related

Print Current Record From DAP

Jan 18, 2005

Hi,

Is there anyway i can print the current record using a button or something ,which i am viewing using Data Access Pages , i have searched a lot of forums but have got nowhere , now i just wanna know how the hell can i use it to print a record or print any report for that matter using a DAP!!! can anyone give me a suggestion or just point me to some reference for using these DAP...

thankx,
solig

View 2 Replies View Related

Print Only Report For Current Record

Aug 20, 2007

I have a report that is tied to a table. On my table form I have a button that prints the report. Is there a way to only print the report for the current record showing on my form?

View 1 Replies View Related

Print Current Record To Report

May 20, 2005

I'm having hard trouble doing print preview current record from form with subform to a report.

When using the code below I'm getting an error for:

The specified field [PolicyNum] could refer to more than 1 table listed in the from clause of your sql statement.

Dim strDocName As String
Dim strLinkCriteria As String

strDocName = "rptCurrentInfo"
strLinkCriteria = "[PolicyNum] = Forms![frmAdjusterMod]![PolicyNum]"

DoCmd.OpenReport strDocName, acViewPreview, , strLinkCriteria

Command button is in the main form frmadjustermod - sbfm is sbfmMoreMod

foreign key is PolicyNum

Thanks,
Michael

View 3 Replies View Related

Print Current Record To A Report?

Dec 23, 2011

Private Sub Command30_Click()
DoCmd.RunCommand acCmdSaveRecord
Dim strDocName As String
Dim strWhere As String
strDocName = "Civil Process"
strWhere = "[FormID]=" & Me!FormID
DoCmd.OpenReport strDocName, acPreview, , strWhere
DoCmd.RunCommand acCmdPrint
End Sub

I can get this code to print only one record but then the button will always print this record. It will not change and print the current record.

FormID is an autonumber to give each record it own id.

View 2 Replies View Related

How To Print Object For Current Record

Dec 4, 2013

I put a button on a form for printing the object but it prints every record. How can I print the object with the current record?

View 3 Replies View Related

Modules & VBA :: Print Current Record From Recordset?

Aug 7, 2015

Is there a way to print the current record from a dao.recordset?

This is an exercise to compare data content.

I have a table with 30 fields and thousands of rows (rs1).

I'm comparing it with a copy of the same table (rs2) that has the same number of fields and the same rows and almost the same content.

I can loop through the recordsets and get the cursor to stop on a field whose values don't match, lets say on row #x

and the programmed message will say something like:

"ROW: 699 Field: [RequestStatus] rs1.VALUE: Closed, DOES NOT MATCH rs2.Value: VOID, in the comparison recordset"Then I'd like to print the entire Row, Row #699.

I thought I could use rs1.getrows but I'm not sure how to make that work.

View 4 Replies View Related

Report Says No Current Record When In Print Preview

Aug 25, 2015

Report says 'No Current Record' when viewing with print preview, even though it works fine in report view?What did I do?

View 10 Replies View Related

Print Single Record Based Upon Current Form

Apr 6, 2006

I need to Print a single record from a form but using a report layout.

I have created the form and created a report. A button on the Form kciks off the print but I get all records rather than just the one shown on the Form. Whats a really simple way of just selecting the Current record.

Where do I put an instruction saying print only this record:confused:

View 9 Replies View Related

Print Current Record - In Form View Not Report

Aug 14, 2006

hi
i have 3 queries brought together in 1 form. i do not want a report to be printed out just the current record in form view. this is because i have a number of images per record.
if i print out the current record and it only has 1 photo in a sub-form attached to the main form record, then the main form will print on 1 page which is what i want [screenshot 1]. But if there are 2 or more photos attached to the main record then the print command button prints out 2 pages for 2 photos, 3 pages for 3 photos and so on [screenshot 2].
any ideas as to how to limit the print command button to print out only 1 page per record regardless of how many photos their are attached to each record??
thanks

View 1 Replies View Related

Forms :: Unable To Print Current Record In The Form

Jun 4, 2014

I tried to follow the Allen Brown print the current record in the form and its not coming up. I can print all of the records but not the current.

View 3 Replies View Related

Forms :: Set The Size And Print Current Record With Subforms

May 30, 2014

I have a form that has 2 subforms. When I try to print the current file there are a few problems,

1) When you use the print option in File menu, and select "Selected Records" , it will always print the second record, no the one selected.

2) No matter how often I change the printer properties , it will not keep the paper size I request.

Is there a script I could use to set the size and print the current record ?

View 1 Replies View Related

Forms :: Print Current Record On Form To Report?

Mar 21, 2013

I have a DB in Access 2007 which I'm having trouble with. I have a form, "Sub_Det_Frm", on which I would like to place a button to print the current record, (Primary Key is an autonumber "Employee Number") to a report "Sub_DetForm_Rpt".

I've used the instructions from, oops I can't show you the link! It's h(double t)p(colon)//allenbrowne(dot)com/casu-15(dot)html but I'm getting this error:

The expression On Click you entered as the property setting produced the following error: A problem occurred while Employee Details was communicating with the OLE server or ActiveX Control.

This error occurs when an event has failed to run because Microsoft Office Access cannot evaluate the location of the logic for the event. For example, if the OnOpen property of a form is set to =[Field], this error occurs because Access expects a macro or event name to run when the event is fired.

View 14 Replies View Related

Print Dialogue Box? Chosing Printer

Sep 14, 2005

Hello,

Is it possible to get Access to open the print dialogue box instead of printing direct to the default printer when using the print command?

Thanks

View 1 Replies View Related

Print Dialogue Box? Chosing Printer

Sep 14, 2005

Hello,

Is it possible to get Access to open the print dialogue box instead of printing direct to the default printer when using the print command from a button?

Thanks

View 3 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 :: Print Preview Button On Main Form That Previews Current Record In A Separate Report

Jan 25, 2014

I have VBA code for a Print Preview button on the main form that previews the current record in a separate Report using this code:

Code:
Private Sub cmdPrintRecord_Click()
Dim strWhere As String

If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If

[code]....

I use this Print Preview code on a Button in the Form Header. The Main form lists head of household information. I also have a tabbed control with three tabs that have SubForms for Address, Children and Contact details. The problem I have is that if any of the subforms are left blank I get a Run-Time Error '3021': No Current Record. If I Debug (press the button), it takes me straight to this line:

Code:
varAge = DateDiff("yyyy", varBirthDate, Now)

highlighted in Yellow.Anyone on my database must have an address, should have contact details and could have children. If any one of these is blank then the print preview will not work.I would like to know how to stop this error happening for blank records in my subforms.

View 11 Replies View Related

Forms :: Added A Print Button To Form To Send Report To Printer

Feb 10, 2014

I have a project which produces a report of names, addresses, etc. I added a print button to the form to send the report to the printer. The code is as follows:

Private Sub Command32_Click()
Docmd.SetWarnings False
'Docmd.OpenReport "rptAddresses", acViewNormal
Docmd.RunCommand acCmdPrint
Docmd.SetWarnings True
End Sub

Both alternatives in the code produce the same result described following.However, the printed report includes only the first 2 colums of about 10 of the 90 plus records. If I send to to a PDF, it works fine. If I do a print view on the screen ir looks fine.

View 1 Replies View Related

Modules & VBA :: How To Load Print Dialog Box

Jul 28, 2015

Users of the db I am working on print using a regular network printer 95% of the time. 5% of the time however, they need to change that printer to another one, or to a PDF printing program. All of the printers they need are installed in their Printers folder.I can think of two possible courses of action here:

1. load the printer dialog box (preferred)

2. provide them with a custom interface to select a temporary printer

I don't want them to have to load the printers folder and switch the printer temporarily.how to load the printer dialog.

View 4 Replies View Related







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