Printing only the subform...

Could anyone give some assist on how to print only the subform in a form. I'm looking to create a print preview command button that will allow only the sub form to be printed... Thanks for the assist.....


Post your answer or comment

comments powered by Disqus
Greeting,
I have a subform of a main form, that records "bloodPressure" of a patient, the table that the subform uses has 3 feilds, "BloodPressureID", "TodayDate" and "BloodPressure" ,

Now when i print a report, i have only one field for the "bloodPressure" where i want to show only the last record, i don't want to show all the previous record,

how do i tell the report to print only the last entry in that BloodPressure Table ?

Thanks

Hi,
I have a form that loads from a menu option. The form has two subforms. All the specs are divided in groups within the forms and subforms. The forms depend on 3 queries that have all the tables correctly gathered. So, every title has a little print button next to it if the user wants to only print that group; if he or she wants to print the entire form, there is a button for that at the end of the form. I am currently having problems with the groups printing. Given that they mostly depend on a separate table and not the general one, every time I click any of the little buttons, I end up printing all the records in that table. I would like to be able to print only the info seen at the moment on the form.

Here is the code of one of the groups:

Private Sub Print_OperatingMechanism_Click()
On Error GoTo Err_Print_OperatingMechanism_Click

Dim stDocName As String

stDocName = "OperatingMechanism"
DoCmd.OpenReport stDocName, acViewPreview

Exit_Print_OperatingMechanism_Click:
Exit Sub

Err_Print_OperatingMechanism_Click:
MsgBox Err.Description
Resume Exit_Print_OperatingMechanism_Click

End Sub

Thanks in advance...

Hi,
How can I get only the first page of a long report of data to print out?

I have a report which pulls the current form's policy number off and sends the data to the report. Sometimes this form will bring several instances of a policy number with, so the report will want to print 4 pages. I only the first 2 pages of the report. So is there anyway to tell command to only print the first two pages? Let me know if this doesn't make sense. Help is always appreciated...

Paps

I'm trying to print out only the current record from my form to a report but each time i recieve an error and dont understant why. this is the code that i have:

Dim strDocName As String
Dim strWhere As String
strDocName = "Resources" 'open report
strWhere = "[ResourceID & ResourceTypeID & ScheduleID & ScheduleDetailsID]= " & Me!ResourceID & _
Me!ResourceTypeID & Me!ScheduleID & Me!ScheduleDetailsID
DoCmd.OpenReport strDocName, acViewPreview, , strWhere

the error that i continue to recieve is ResourceTypeID is not found or does not exist. if i delete it then another error appears saying the ScheduleID is not found or does not exist.
can you help?

When I've created a print command button on one of my forms it prints out all the records not just the one which is being viewed. How so I tell it to only print out the form containing the active record???????

I would like to be able to print a page with only the Report Footer information in it. Could anyone give me some suggestions

I have a report with a several records on it. I need to print only the last record, but to preview all of them.
Can anybody help me?

Hello. I'm sure this is a relatively easy question but I seem to be having trouble with it. We have a database of patients participating in studies. At times we would like to email certain reports. Due to confidentiality reasons we do not want to send patient names by email. How can I print only the first letter of the fields containing the first name and last name (initials) on the report?

I am trying to print a report with a page for each facility, and each page shows the patient with the top total payments at that facility, and a list of that patient's claims. However, the page should not display if the total payments are =1000? If I put the criteria in the subreport query, it will still print the facility name and number and the column headings (which are in the main report) for the pages with empty subreports.

I have a list box that displays the results of a SQL query that a user enters into a text box. I would like to print this list box but I cant figure out how to get it to print only the list box and not the whole form. Is there a way to just print the list box values and not the whole form? The list box name is lboResults and I cant figure out how to print it using the docmd.printout or just the .print commands. Any help would be greatly appreciated.

Hi,
As you have guessed an Access newbie here. I have created a table with a form for entering the details and also its report format. Now I want to add a command button to the form which would print only the details of the presently seen record. I have added a button "Print Report". But it tries to print all the records instead of only the presently seen one. I must be missing something very obvious here. Could anybody help me out. Thanx.

PS: Know nothing of VBA or Macros. If it involves any of these, I am afraid you have to give me step-by-step instructions.

Hi all,

I am trying to give a few people a complex Visio diagram (many layers that get turned on and off due to user action). The problem is whenever I print it, it prints ALL layers, whether they are visible or not at the time.

How can I have Visio print ONLY the visible layers? I want to set it up so the user only has to press the print button, or a button tied to a macro, to do this (not messing with any settings in the Print dialog box, they are not technically savy AT ALL).

I could NOT find an option in Visio anywhere for this (am I just missing it?!). Otherwise the only other thing I could think of is making a button on each Visio page tied to a macro that sets all Visible layers to Printable, and all non-Visible layers to non-Printable, and then ~somehow(?) having it send the print request through.


Any help with this would be amazing. I'm still learning Visio/VBA so if you could provide any code examples for ANY of this it would be very helpful!!

Thank you!!

Hello,

I have done a search on this forum and found all the postings relating to printing only the current record for a report. I have a command button and have followed what these posts say. The report prints the current record but leaves out the data from the subform.

The database is a recipe organizer. The main form is called Recipes and the subform contains the ingredients for each recipe. This subform is called Ingredients.

I set up a command button with the following code:

Private Sub Print_Recipe_Click()
On Error GoTo Err_Print_Recipe_Click

Dim stDocName As String

stDocName = "Family Recipes"
DoCmd.OpenReport stDocName, acNormal, , "[RecipeID] = " & Forms!RECIPES![RecipeID]

Exit_Print_Recipe_Click:
Exit Sub

Err_Print_Recipe_Click:
MsgBox Err.Description
Resume Exit_Print_Recipe_Click

End Sub

Since the RecipeID is used in both forms and the report, I thought it would be the best field to use since it linked all the information together.

So what do I need to do so that the subform data prints out on the report?

Thanks
GeekyGirl

Please Help!! I have created a form that displays multiple results from an underlying query. I am trying to figure out how to link these query results to a report and only VIEW and PRINT the CURRENT RECORD from the query, not all of the results.

In other words, when I go to print the report from this query results form, it prints all of the records. I want to be able to select one of the records from the query results form and print only this record in report form.

Any Suggestions?? Thanks for the help.

I have a report that will print out 50+ pages. When I add one record that starts with A in my alphabetically listed report I would like to only print the records that start with A, in order to save pages. Is this possible. Thanks to all.

I have many reports that my bosses want to see the details for, but when they click the printer icon, they only ever want the first page.

What can I do to display all data, but force only the first page to print?

Thanks so much,

~Correenie

Both my form and subform within work great. Thanks for all that have helped answer my questions over the past week of learning Access 2003.

The only problem is that when I use "Print Preview", the subforms are missing.

What steps do I take to not only show subforms, but to print as well?
-Tracy

I have my subform on my main form and when I press the print button that I created it prints the main form 200 times due to the amout of records in the table.

When I open the subform by its self then press the print button that I created it will print what I want, the subform only.
Please help!! I want to print this subform from the main form.

Thanks,

hello
I have a main form with an unbound combo to select product types which shows single records you can click through and a sub form datasheet view that shows all records of that type.
But it prints all records of the table the forms are based on.
How can i print only the records showing in the subform of that product type.
Please help
Thanks
kiwi

My main form contains several subforms, of which several will always contain data, and several other subforms may or may not contain data. This information displays properly and I could print it with an earlier version of Access. With Access 2007, only the main form includes data in the printout. The subforms show their container boxes, but no data.
Help please.

I have a Database that has a Main form and three subforms Video, Audio and Photos. Main form and the other three Subforms are all linked with the autonumber in the Main form. Whenever I have all the three media, Video, Audio and Photos I fill in their data with their numbers. But if I have to fill in only the required data for either one or two of them how avoid the auto number being generated on the subform that doesn’t need to be filled. We used to do this earlier in our DOS database with a YES or NO field. Only a YES will prompt the data to be filled in the other related tables. I do have one each YES / NO field for Video, Audio and Photos in the main form in Access but will it do the same or which is the other way to enter data to the only required subform? Thank you.

Hi, hope someone can understand me
I have inserted a subform and cannot make it print with the main form. The subform has 4 different columns that need to print. I can get the form to print, but the subform doesn't, there is just a blank space where it should be. Any suggestions? I'm not sure if this is impossible, but it seems like it today. Thanks for any help you can give.

I need the button to print any records that have not already been printed, even if this means you click on the button at 10am in the morning and then you might want to click on it at 12am the same day - the button just needs to pick up only the reports that haven't been printed before and print those.
I'm quite new to Access, so don't know how to do what you suggest anyway.
any more ideas?
thanks


i found this code

DoCmd.OpenReport "Reportname", acViewNormal, WhereCondition := "Printed=False And RecordDate=#" & Date() & "#" ' force it to print on the printer
DoCmd.SetWarnings False
DoCmd.RunSQL "Update table set printed=true where Printed=false and RecordDate=#" & Date() & "#"
DoCmd.SetWarnings True


but no solution
any help plmease


Not finding an answer? Try a Google search.