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 Replies


ADVERTISEMENT

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

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

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

Reports :: Print Only Report Matching Current Record In Form Among Multiple Reports

Oct 2, 2013

I have been an MS Excel man all along my career and I am a novice in MS Access.I have created a table, [Initial Customer Approval] which records data from a Form, [Initial Customer Approval]. Once the data is entered in the Form, I need to do some calculations based on the data entered in some of the fields in the form.I created 6 different queries for the six possible values in those fields. now for each of those queries I created respective reports.I placed a Print command button in the Form.

1. When I press the Print button it should open the report for the current record in the Form. (Currently It Opens all the reports simulatneously, with only one relevant report containing the current record; other opened reports being blank.)

2. If user presses the Print button before pressing Save button then system should prompt user.

Here is the code (Please note [reference number] is the unique ID generated for each record entered in the tabe through form):

Private bSaveClicked As Boolean
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Not bSaveClicked Then
MsgBox "You are trying to navigate away from the active record. Please either save your changes, or press ESC to cancel your changes.", vbOKOnly + vbInformation
Cancel = True

[code]...

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

View Current Record On A Report

Apr 19, 2006

I have a report which shows all the records in my database. I have a command button on my form which brings up that report for preview.

How can I get the button to bring up that report showing only the current record being viewed on the form?

Do I need a separate report and what criteria/VB code is required?

View 1 Replies View Related

Print Current Form With A Report

Aug 2, 2013

I have a form titled "Search by Contract # - Active". I tried adding a command button to print the current form. I created a report called "Active Contract" ro carry out this function. To open the form the user must enter a contract number to view the record. This is what I want the form to do. However, when I try to print the record from my command I'm getting an error. why it won't pull up the report?

View 1 Replies View Related

Using Expressions And Current ID Of A Form To Create A Query And Print A Report

Mar 6, 2013

I want to have Access run a query, open a report, and print the report based on the ID number of the form that I have open. Is this possible?

The situation would be, I have a form that uses the the primary key as a record number. After I enter the data into the form, with the form open I want to add a button to open and print a report of the current record number.

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

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

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

Forms :: Print Single Record As Form (not Report)

Jul 17, 2014

I need to find a way to print the currently selected record (by clicking a button in the form) as a form. I know printing is almost always done in records, but they use the forms by hand before entering them into the computer database.

One tough part of this is that this printing function needs to be sustainable through revisions of the form, as we will be constantly updating it.

Is there a way to print the form with only the current record shown without creating a second form or report?

View 2 Replies View Related

Forms :: Unable To Print A Report From A Record In Form

Oct 14, 2013

Why I cannot print a report using a single record in a form using Access 2007.

I have added the button, I am using the following code:

Private Sub cmdPrintRecord_Click()
Dim strReportName As String
Dim strCriteria As String
strReportName = "Receipt"
strCriteria = "[ID]='" & Me![ID] & "'"
DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
End Sub

However when I click the button nothing happens. I have attached the database ...

I am using the Contacts Entry form, and when I am on a record that someone has paid I want to be able to print from the Receipt report that has a simple formed up letter.

View 8 Replies View Related

Forms :: Want Report View To Look Like Print Preview

Mar 13, 2013

I have the following code in the On Format Event of the report. It is used to hide duplicates which result from very loose Where parameters when I run Docmd.OpenReport. With tighter Where parameters there are no Duplicates.

I am aware that the On Format event does not fire and I am to use the On Paint event. However, the On Paint Event seems very limited. It does not have a Cancel and most code that i tried does not work.

Code:
Private strLastGen As String 'Report Module Variable
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
'If a duplicate Generator
If Me.GeneratorNumber & Me.GeneratorName = strLastGen Then
Cancel = True
End If
' Save the Gen Num of this record
strLastGen = Me.GeneratorNumber & Me.GeneratorName

End Sub

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

Reports :: Can Get Image To Show In Report Print View

May 29, 2013

I have a report which gets it's records from a table which has OLE Object data type being a "file.jpg". can I get the image to show in the report print view and also print it with the report?

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

General :: Return Current View Of Report

May 23, 2013

if there is a VBA command that returns the current view of the current active report. I am running code the uses the SetFocus Action, which works fin in Report view, but when I try to go to Print Preview view, Access throws an error stating that the command or action is not available in the current view - and the GetFocus action is the culprit.I can skip the GetFocus action if I know the Report is in Print Preview mode.

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

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

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

General :: Results Of DLookup Not Showing In Report View But Are Visible In Print Preview

Jun 25, 2013

I have a report with quite a few subreports in it. There are a number of calculated fields on the form, most of which use Dlookup to retrieve at least one of the figures required for the calculation. The Dlookup runs fine and the report opens but the calculated fields are devoid of data in Report view. When I switch to Print Preview view the fields are now populated. Below are two variations of the DLookup syntax I have used to try and alleviate this issue.

=DLookUp("[8]","qry_MonthlyTotalsByYearFirstAid","[ActivityType] = 'First Aid Injury (FAC) Reported in Safeguard'")/[sub_AllHours].[Report].[8]

=DLookUp("[8]","qry_MonthlyTotalsByYearFirstAid","[ActivityType] = 'First Aid Injury (FAC) Reported in Safeguard'")/[Reports]![rpt_AllFigures]![sub_AllHours]![8]

Note that the field [8] specified here is simply a month number and forms a column in the crosstab query for the corresponding query name.

I would add the query referred to in the DLookup to the source query for the report but the source report's data is derived from a Crosstab query, which only accepts one data field (Access terms this as the value field.

View 4 Replies View Related

Auto Print Report For Only Latest Record On Add New Record Event??

Jun 21, 2005

Hi All,
I am looking for some help with a project I am working on where I need to automatically print a report from my database every time a new record is added to the table. The table contains 13 fields and the report needs to display 12 of them, the other being the index which is set to Autonumber.

The table is being updated solely by ODBC, this is working OK.

There is the potential for records to be added to the table very quickly via the ODBC link, so I need to safeguard that the report is being populated with correct information from the record that triggered the print event. Also, should multiple records be added in close succession, a report needs to be correctly generated/printed for each of one. The DB is to have no user intervention, and will just run on the PC at startup with all access menus/controls locked out.

Any information on how you think I should structure this, or any examples of helpful code that you might have would be very much appreciated.


Thanks in advance, :)
Jon.

View 7 Replies View Related







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