I'm pretty new to all of this. I've set up a simple database. I have a form in it for inputting information and then there is a command button on the bottom which prints out a report I've created with the information on it. This is all working great except it prints evey record and I only want the current record printed out.
I've tried the help and it goes into detail about OpenReport and PrintOut in macros. I have no idea what a macro is or what to do with it.
Can anybody please help me and give me step by step instructions as to how to print out only the current record in the report from the command button.
I have a form (entry screen to enter data) I then created a report in the layout I need for my order form. I want to creat a button that a user can press and it will print the current record to the report (order form layout)
Here is my current code for the print button on the form page: Private Sub btnPrtOrderFrm_Click() On Error GoTo Err_btnPrtOrderFrm_Click
Access has a function that allows us to print the current form that we are viewing. However, is it possible to print the form out without printing out the interface?
I add a button on the form, when i click on the button, the function should allow me to print out the current record only but without the interface/buttons? The primary key of the each record is Car_Number.
Okay, here is the situation that is slowly driving me crazy.Form: Clients ACTIVESubform: Clients ACTIVE - closureReport: Clients ACTIVE - closure (created by a save as by the subform)My database was created to keep track of clients in a centre. The clients files are eventually closed by a checkbox. Then a number of reasons are inputted in as for why the file is now closed by means of a combo box (lost contact, graduated, etc). After the files are closed, the users want to print a simple one-page report that they can put in their manual (paper) file. I created a subform that allows the users to preview what will be on the resulting report. I also created a button that they can click to print the report.NOW for the problem,The report will not show the new information (closed checkbox = yes, reason for closure, notes about closure, etc). I can't refresh because then the client no longer shows up in the form as it only includes ACTIVE aka open files aka Closed=No.Here is my coding for the button that I have:Private Sub Closure_Click()On Error GoTo Err_Printable_Click Dim stDocName As String stDocName = "Clients ACTIVE - closure" stLinkCriteria = "[StudentNumber]=" & "'" & Me![StudentNumber] & "'" DoCmd.OpenReport stDocName, acNormal, , stLinkCriteria Exit_Printable_Click: Exit SubErr_Printable_Click: MsgBox Err.Description Resume Exit_Printable_ClickEnd SubHELP ANYONE??? :) My only idea is to do this is something like where is matches the student numbers, refreshes the form, and prints the report. BUT no matter where I put the refresh or requery command, it doesn't work. It ends up printing a blank report as it can not find the student number in the ACTIVE form as the client is now closed.
I am trying to save my form that i have created as a report by right clicking on the form and choosing save as report. However, my form includes a subform but the subform does not show up in the report. Any ideas as to why this and how it can be shown????
The user then enters inspection details in to the "DivingInspectionCert" form which i want to store in a table (DivingCert) which will relate to the item. On completion of this form the user then clicks on a command button with this code:
If Me.RecordsetClone.RecordCount = 0 Then MsgBox "There are no items to Print", vbInformation, "EquiTrac" End Else DoCmd.OpenReport "DivingInspectionRpt", , , ("EquipmentID = " & Me!EquipmentID) DoCmd.Close
When i click on this button, the report doesn't print and i get a message "No current record". The inspection details are not stored in the table. I did have the forms RecordSource based on the table "DivingCert" but that didn't work and i have just tried a query but it is still not working.
Would be much appreciated if you can help me. Thank you
"You have written a subquery that can return more than one field without using the EXISTS reserved word in the main query's FROM clause. Revise the SELECT statement of the subquery to request only one field."
I only use one Sql statement. Anyone know any other reasons this error is firing?
I'm really pulling my hair out on this one. I'm sure it is a simple fix, but I just can't figure it out...
Two tables; Customers and ServiceCalls.
My main form is based on the Customers table with a Subform from the ServiceCalls table (One to many). I want to put a button on my form to print a Service Call report with data from the currently displayed Customer, and data from the currently displayed ServiceCall in the subform.
Do I need a qry, or ???? It must be really late... I'm so lost on this.
I'm working on my first project with no training. I have my form set up so that I have a print report button at the bottom. The only problem is that when I press it all records are printed and not just the one I'm viewing. How can I make it print only the record I'm viewing. Keep in mind I'm a total novice and know nothing about code. Thank you for your help!
I have a form that the user enters the customer id before the form comes up. The Form does reflect some information and the user add/edit the mailing address and save and close the form. I have the command button to save, label printing and a welcome letter(report)for just the record open in the form but each requires the id to be entered. I currently have the mailing label as a report since we are using a full sheet for the label and a report for the welcome letter. The form and Mailing label run off the same query and the welcome letter is off a different query but each query uses the ID to locate the record.
Ideally, I would love to have the user enter the id and the form come up and the user adds/edits the address and then print the label and welcome letter without having to enter the id 3 times. Is this possible??????? AND how????? BTW, I am a novice so you will need to be detailed.
I have a form showing customer details with a payment subform in it. The payment subform shows records of payments. In the subform footer, I have calculated the sum of payments. It looks great on the form.
Customer Details Payments subform Calculated control summing payments made so far (looks for the payment received date to include)
I have a report that has customer details, and payment information for that one payment record in the form. I have coded it as Do.Cmd.OpenReport stDocname, aspreview,,"[PaymentID]="& Me.PaymentID
This works great to pull the right information on the form, however I am having trouble getting the sum control on the subform footer to appear on the report. I understand that it is pulling only one record for the report with only one figure, however I am not sure why it won't just lookup the sum. I have it referenced on the report control as: Forms!InvestorPaymentForm!SumofPayments.
My goal is to print the invoice with the customer name and details, the current payment due (from the payment subform) and also sum any previous payments made.
I am creating an access database that holds customer information for a friend of mine. I am struggleing to think of ways to make Access do several tasks.
I have created several forms that display when reletive buttons are clicked and some run automatically using queries, one of which runs a query that displays any upcoming service inervals that are within thirty days of the current date, and allows the user to print a report that is designed to be a service notice for the relevant Customer/s which contains the customers address, phone numbers and service due date with a small pre-made text insert that advises the Customer about the upcoming service recommedation. The Form also provides the ability to print address labels for the same customers, making it quick and easy to send them out by post. The problem that I am having is that I would like the customers information that has already been printed to be removed or greyed out in someway so that the query does'nt print out duplicates but also have the ability to allow user control to reprint any result that may for any reason need reprinting.
Hi all, i'm having a rather annoying problem. When I view my report I have 2 sets of conditional formatting that run, one that changes the back colours of certain fileds when the criteria is meet, and the second, the text colour of certain fields, both of which work fine when previewing the report. However, when I print the report, any of the back colour in the preview does not print out but text colour does. If I print from another office programme i.e. Word, block colour is printed fine its just seems to not work in my access.
Please note that if the same report is printed from another computer, it prints fine.
Please does anyone have any idea on why this is happening and how to sort it. Thanks in advance for any ideas and help.
I have a pop-up form which I use to filter data on a report that prints out labels. I also have some code on my report which asks the user if they wish to skip labels, they enter the number of labels the wish to start printing from. This code runs when the Apply button on the form is clicked. Everything seems to be working fine on the report.
When you click the print button (on the form). The report/labels print out but they are no labels skipped. The labels start printing from the top of the page. If I click on the report and then click the print button it works fine. The labels start printing at the desired one showed on the report. I canít seem to set focus on the report without manually clicking on it. Has anyone got any ideas/suggestions. Thanks, Rita
Hi, Ive read all I can on forums and web and am still unable to print the current forms report using a command buttons on click. This is the code i have been playing with:
Dim strDocName As String Dim strWhere As String strDocName = "Home_Oxygen_Report" 1. 'strWhere = "[general_info.HospitalNumber]= Me!Home_Oxygen_Form!general_info.HospitalNumber" 2. strWhere = "[general_info.HospitalNumber]= "" & Me![general_info.HospitalNumber] & """ 3. 'strWhere "[general_info.HospitalNumber]='" & Me![general_info.HospitalNumber] & "'" DoCmd.OpenReport strDocName, acViewPreview, , strWhere Number 3 gives the closest result but it prompts me to enter the primary key when i hit the command button but i need it to do this automatically. The primary key is a text box not number. Note that the primary key is HospitalNumeber of Table general_info (form and reports record source is query of many tables).
I inserted an image (jpg) in a report, it appears in PrintPreview, but not when I print it on my printer. Please help me. I do not if the problem is with my printer or I'm doing something wrong when inserting the image.
update: It seems to work when printing from Print icon, but does not work when printing from File/Print menu. Is this a known bug?
Problem: I have a databse that is on a network at the office. My users are out in the field using mobile data computers linked to the network using verizon air cards (56.6 kbps modem). Whenever they want to print a report, since the front ends of the DB are on their computers and the back end is on the server, the mobile computer has to send the actual report from the computer over the air card to the server for printing. Each page takes 5-7 minutes before it prints at the office.
Question: Since the data resides in a table on the back end on the server, Is there a way to have the reports reside on the server as well and have the Mobile computers simply send a command to print the report from there so it's not having to send all that information over the incredbly slow air card? Or am I just going about this the wrong way altogether?
I'm not totally up to speed yet on all this computer lingo so please use little words (LOL).
Not sure this is the right forum, but the time it takes for our reports to print is becoming excessive. We can preview reports on the screen almost immediately, but when trying to print the hard copy it can take as much as 10 minutes. We are printing to a network printer, but don't have this problem with Word or Excel documents. In fact, I don't even have this problem in every database. Any ideas what could be causing it?
I have a relational database with a continuous sub form where I enter data via bar code scanning. When the last field is scanned in the record, you automatically drop to the first field of a new record. Here is my challenge, I want the computer to automatically print a single sheet with the information about the record just entered without messing up the continuous data entry process. Can this be done?
I'm probably going about this the wrong way all together, but what I'm trying to do is print a single record from a form in a report. Basically after the client fills in the form they can print their "results report" using the click box (command button) in the bottom corner of the form. When the client clicks on the button it prints all the records ("result reports") of all the clients...no good of course. Here's the code for the button:
Private Sub PrintSingleChamber_Click() On Error GoTo Err_PrintSingleChamber_Click
I have a report with several subreports which run agains a very large table. If I decide to print the report after examining it, all of the underlying queries must run again. Is there any way around this to avoid this delay, other than exporting as rtf or snp?
I have a drop down list on a form that prints a report based off of the selection in the cbo box...
(I have already changed the query and relationship for the lookup and maintable)
Here is the code that works fine,(this is on a command button)
Private Sub cmdViewStreet_Click() stDocName = "rptStreetName" On Error Resume Next DoCmd.OpenReport "rptStreetName", acViewPreview, acEdit Me.cboStreetName = Null End Sub
What I am doing now.. is this: the look up table that had the street names but did not have an autonumber or primary key. I added in a autonumber and primary key. I can get the cboStreetName to list the street names and not the autonumber.. and I can get the main table to store the autonumber not the street name (this is what I want).. but now I can't get it to view what is in the cboStreetName... When I hit the view button it does nothing... Any suggestions?? If you need more info please let me know...
I tried something like this to:
Private Sub cmdViewStreet_Click() On Error GoTo Err_cmdViewStreet_Click Dim stDocName As String stDocName = "rptStreetName" DoCmd.OpenReport "rptStreetName", acPreview, , "[StreetName]=" & Me.cboStreetName.Column(0) Exit_cmdViewStreet_Click: Me.cboStreetname = Null Exit Sub
I have a subform that displays results based on selections from cascading boxes on the form. I am trying to print them to a report. I think my procedure is correct for the print button and Im afraid my problem is that the form is not based on a seperate query. Is that they only way to be able to print? It is based on procedures defined in the cascading boxes. How can correct it so it will print the results to a report? Thanx.
I have 2 single-page Access reports. The first report has the following fields: FirstName, LastName, StreetName, HomeNumber. The second report has the following fields: MerchantA, MerchantB, MerchantC.
The data for the first report are taken from tblBuyers, the data for the second report are taken from tblMerchandise.
I need to print 2 copies of the first report and 4 copies of the second report for the first Buyer, then 2 copies of the first report and 4 copies of the second report for the second Buyer and so on. Can I help on this problem ? Rgds
I have a form which is used for data entry for a new record only. I then wish to print some of this record's details on a report, using a command button on the form. At present I cannot filter to get just the current records details on the report - I am getting the report containing all records in the table.
I've made a database which includes a report for invoices. There are 20 pages, 20 invoices, and i want to know how to make a macro to print just one of the pages. On my report I have an invoice number text box which i was thinking the macro would ask me for and then print. any ideas?