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 Replies


ADVERTISEMENT

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

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

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

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

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

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

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

Print Report From Form

Oct 2, 2005

I have a form which records the progress of a complaint investigation. There are 3 reports I would like to run from this form using command buttons. They are report_long (shows all activity) report_short (summary) and logsheet.
The primary key is complt#.
How do I ensure that the complaint being printed is the complt# I have on the form?

View 6 Replies View Related

Print Report From Form

Mar 10, 2006

Please bear with my ramblings, but I’m not sure what you may find relevant.

I am currently doing work for a service company where the employees are required to wear the company’s uniform. When someone joins the company they are required to purchase their own uniform. After a year, the company buys the replacement uniform. Each year on the anniversary date, the employee is given their annual evaluation. At that time they are given a requisition to go to the uniform supplier for new uniform articles.

Each item in the uniform has a life span. For example, shirts and pants are replaced each year, winter coats and spring/fall coats are replaced every three years, caps every two years etc.

I have a form which lists the item no., description and cost of each item and when they are due to be replaced. For example
Winter coat last replaced on 2003/11/10, replacement date is calculated to 2006/11/10
When this employee has his evaluation this November, he will be entitled to a new winter coat. The calculations are done by clicking an option button beside the item on the form. Clicking replaces the issue date with Date() and adds three years to the issue date using DateAdd for a new replacement date. Clicking the button also indicates that the item is to be replaced.

NOW, I have all this working.

What I would like to do is find some way of printing the requisition from this form before closing it. Something along the lines of:

If Option1 is yes
Print this item on the requisition
Endif

And do this on every item on the form, if it’s yes, print it on the requisition, if its no ignore it.

The option buttons are not part of the underlying tables or query only part of the form.

If I’m doing this backwards, please let me know. I’m well ahead of my deadline.

View 1 Replies View Related

Form/Report Print

Mar 22, 2006

I have a form and the information on the form is displayed in a report so the user can print it out.

I have placed a command button on the form so that when you press the button you can print the report.

I was wondering if there was a way how i could just get it to print of the specific page i was on at the time.

Thanks for any help

View 1 Replies View Related

Getting Data On Form To Print On Report

Dec 12, 2006

Hello,

I have a time and billing database that contains a form where the user enters a beginning date and an end date and then must enter an invoice number. All this information will appear in the header of a report. The invoice number will always be different. How can I get the invoice number to print on the report? The beginning and ending date is working just fine, but I can't get the invoice number to print. I think I need to have whatever number is entered to be temporarily stored to a table, but I am not sure at all. I would appreciate any help given.

Thanks.

View 1 Replies View Related

Take Information From A Form, Use To Print Out A Report

Dec 11, 2007

I have a patient information database which uses a filtered form to show records for only one patient at a time. All the records in the database are linked together using one number, the patient's unique identifier.

I have designed a report which draws information from separate tables and generates a complete summary of information. This report depends on having the ID number of the patient to generate the report.

Originally, I had envisioned having a command button on the data entry form, which would then automatically take the ID number from the form, and generate the report. Though good in theory, it never worked out in practice, as I could never figure out how to make it happen.

Is there a way to design a macro or some other thing that would take the ID number from the field on the form, and use it to generate the report? Currently, I have it configured to prompt me for the ID number. When I enter it manually, the report is generated perfectly.

Thank you in advance,

View 2 Replies View Related

Reports :: Print From A Form To A Report?

Jul 21, 2015

I am trying to print from a form to a report. The problem I am running into is I am getting a long report and I have discovered I have basically the same number of pages in my report as I have entries in my subform. If I have one entry in my subform I get a 1 page report. If I have 2 entries in my subform, I get 2 pages in my report and they look exactly the same. What am I doing wrong?

View 2 Replies View Related

Print Report From Searchable Form

Jan 24, 2012

I am new to access and i found i am struggling to find out how to print record . I have a table with following field :

Name , Bank Account number , picture

I would like to make a form that can search for specific record suppose search for name and show the result in the form.

That result form can be printed in a report ( report only contain one record from the form ).

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

Transfer Information From A Form To A Report Then Print

Mar 16, 2005

Hi there

This im sure is an easyone to most of you but for me I cant find away around my problem!!

I have a form I use to enter infomation and I have also made a report that I am trying to get the infomation from the form onto the report.

I would like to have a command button on the form that once I click it, it then prints out the report.
How do I get the information from a form to a report as when I have tried doing this myself it only allows me to use information from a query or table.


Any suggestions would be great for this newbie!!!


Thank you

View 2 Replies View Related

Modules & VBA :: Print Single Report From Form

Mar 11, 2015

I'm trying to print a Report specific to the record i'm viewing on my Form. I've created a Report linked to the Table - "SCJobsheet".I've created a button in my Form;

Name; cmdSCJobsheet
Caption: Print Record
OnClick: [Event Procudure]

[code]...

The Report is opening but shows Every record (Not just the one I'm viewing in the Form.

View 12 Replies View Related

VBA Print 5 Copies Of Report Via Button On The Form

Nov 1, 2011

I am trying to print 5 copies of the report via the button on the form.

I'm sure I have the code correct, however I only prints 1 copy instead of 5.

View 1 Replies View Related

Print Report From Form Based On Multiple Criteria?

Nov 17, 2006

Hi,

I have the following code which i found on another thread on this forum (thanks to original author) which is attached to the On Click of a button which prints the report corresponding to the details displayed in the form.

Dim strCriterion As String
Dim strMsg As String, strTitle As String
Dim intStyle As Integer

If IsNull(Me![ReferenceNumber]) Then

strMsg = "You cannot print a Blank Form!!."
strTitle = "Print Error"
intStyle = vbOKOnly
MsgBox strMsg, intStyle, strTitle

Exit Sub
End If

If Me.Dirty Then
Me.Dirty = False
End If

strCriterion = "[ReferenceNumber]=" & Me![ReferenceNumber]
DoCmd.OpenReport "DoC Certificate", acViewNormal, , strCriterion

This works fine, however, i need to be able to select the report based on more than 1 criteria. For example, the Reference Number can be repeated but is distinguishable from each other by an Issue Number i.e. ReferenceNumber = 93, Issue 1 or 2 etc. At present when i run the above it prints all versions of, in this case, reference number 93, which given that each report is only a single page isn't a show-stopper but it would be nice to have it working as i would like.

I have tried adding to the strCriterion line such as strCriterion = "[ReferenceNumber]=" & Me![ReferenceNumber] and "[IssueNumber]=" & Me![IssueNumber] but no joy. I have tried bracketing the whole line and variations thereof, again no joy.

Can anybody tell if what i am attempting to do is possible and if so how do i go about it?

I have tried the above coding using MasterID which is the Autonumber PK but it produces an "Enter Parameter Value" box for MasterID. Obvioulsy if i can get it to work for the Autonumber then my problem goes away but i can't seem to figure out why it works for Reference Number (Number) and not MasterId (Autonumber)?

Regards

Alan

View 5 Replies View Related







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