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.
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.
I have a question related with a report i`m using to print labels. I am not familiar with Access and this is quite a challenge to do it alone.
In the attached file there is a report called "MICRA", when started it asks that you want to select (default is 1 and special select in this case is 11) and next it asks "SPS", the value entered there is printed in the bottom right corner of the report.
My question is is it possible if in the SPS field is entered a special value (for example "MASS") to print 30 labels of each selected label with text in this fiels = "val.1"; 15 with text in the field = "val.2"; 10 with "val.3" and 10 with "val.4" and after that to print next label with same rules...
And if not entered "MASS" to print just 4 copies of every label.
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:
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.
I have a form which contains a subform. On this subform, the user will enter several lines of container ID numbers. If one of these containers has errors, they check a yes/no box and a pop up form opens for them to enter the details of the errors.
I want two fields that are populated on the subform to transfer information to the corresponding two fields on the pop up form. This works when only one container ID has been added to the subform. However, when there are multiple containers in the subform and the container with the errors happens to be the second or third record on the subform, the pop up form always transfers the information from the first record to those fields.
I also have the subform requerying when the check box is checked so that the information saves to the table and the focus does stay on the correct record but the pop up form still opens with the wrong information.
how to transfer the information from the record that the user is currently on?
I've written an application in VB.Net and now I need to transfer the data on textboxes on a form to a report for printing. Only the data on the form is what I want to preview and print.
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?
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.
I have a Table with Emp_ID and Details of my Employees. I have created a query and set parameter [Enter Emp_ID]. When I pull up a report, I get a pop-up and it asks me for the Emp_ID. When I input same, I get the information I need. Everything is good so far...
My Question... I have designed a report when user will need to enter Emp_ID and click on a button and they will get the report "EMPReport" without having the pop-up window asking for EmpID.
I have been using the below code but I get the pop-up again and I need to enter the Emp_ID again to view the report
See below Code:
Code: Private Sub Image11_Click() If IsNull(Me.Emp_ID) Or Me.Emp_ID = "" Then MsgBox "You must enter an Emp ID.", vbOKOnly, "Required Data" Me.Emp_ID.SetFocus Exit Sub End If DoCmd.OpenReport "Rpt_HR1", acViewPreview, , "[Emp_ID]= " & "" & Me!Emp_ID & "" End Sub
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.
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?
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?
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.
The database I have created is to produce product description sheets. From the switchboard, the user clicks a button that opens a form on which they can enter about 5 bits of information , then select the product they wish to produce the product sheet for and when they click a button, the product sheet is produced. The product sheet is a report with a subreport. The information entered on the form is included with more information from the database on the main report and the subreport is based on a union query which combines information from 2 tables to list the items included in this product. (the information the user inputs into the form is information that changes depending on the situation and is not stored in the database.
Now comes the next step in this process. Just as the information input into the form is temporary information, there is also one bit of information that needs to be input on a temporary bases for the items that are listed on the subreport. Each of the items on this subreport needs an assignment of AAA or BBB that needs to appear in the subreport on the line with that particular item. There can be one item in an product, or there can be many and the listing of AAA or BBB can be different from one item to the next or they could all be the same. The assignment needs to be made on an item basis.
My thoughts on this were to have a subform appear once the user selects the product on the form which would list all of the items and allow them to select either AAA or BBB in a column on this form. Then when the click to open the report, those assignments would carry through to the report.I have been able to create a continuous form displaying all of the items based on the union query but that's as far as I can get. Not even sure if that is the way to go.
Is there a way to reference the AAA and BBB input on the subform I described so that it displays in the report.
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
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
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)?
Basically i have a form where i get info from multiple tables. On the main form itself i have 3 calculated fields for hours where i add all the hours i choose (from a subform) onto the main form.
My issue is i can create a query to come up with all the fields for my report, but how do i get the calculated fields on my main form on the report? Is there a way to print the calculated fields on the main form to a report? or do i have to do the same calculations on the report itself?
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?
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.
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.
I am using the Navigation form and I have a tab that has all the sales quotes for a particular salesperson. Because my salespeople like to work with paper I have created sub tabs which contain a report with the same information but filtered based as follows: this Month, this year, and Last year. This report needs to be printable based on the filtered information so I created a print button within the report however when clicked it prints the entire report not the filtered report.
The filter criteria is located in the navigation button, navigation where under the data properties. I have the on click event of the button set to open the report in print preview but I need to know how I filter the where in the macro to read the criteria from the active navigation button property?
I have a database that has all the employees in my company with basic information. I have a auto number set up for each person. I also have on my form a subform with information about the employee's history in the company. I have bin trying for the last couple weeks, to put a button on my form, that will open up the custom report I made for the one employee, in print preview mode. Everything I have tried gives me a error. The main error I get is The database engine could not lock the table "EmployeeT" because it is already in use by another person or process. If I open the report by itself, then I get all my employees. I am looking to just open a single report from the form I am currently looking at.
I have 2 tables. One Named EmployeeT with all the employees basic information. I have a auto number with the field name EmployeeID.
The 2nd table is called IncidentT, which has its own auto number, and records all the problem/incidents with the employee. For example, lates, if the did not show up, or cancelled out of that day, etc. I have the 2 tables sharing the EmployeeID, sharing the relationship. My main form, has a lot of my information and a subform, Like i said. But no matter what I try I can get rid of that error.
The only way I got it to work without the error, is when I go into properties and change the Record Set Type to Snapshot on both the form and subform. But then I can't edit the form or subform anymore.