![]() |
Printing a selected record
Hi,
I have a simple check keeping database that also prints out checks on laser single sheet checks. I created a form to enter the check data, and then a form to print the check. This print form only has the pertinent info and is spaced to fill in the blanks on the laser check. It worked fine until I added a second check record. Now when I hit the print button, it always prints all the records. I want it to print the record data that is in the "EnterCheck" form in the "PrintrCheck" form. Here is the current code that does the printing and is run when I click on the print button on the "EnterCheck" form, I have not been able to get it to only print the data which is displayed in the current form. Private Sub PrintCheck_Click() Dim stDocName As String Dim MyForm As Form stDocName = "PrintrCheck" Set MyForm = Screen.ActiveForm DoCmd.SelectObject acForm, stDocName, True DoCmd.PrintOut DoCmd.SelectObject acForm, MyForm.Name, False End Sub |
Printing a selected record
Sorry, this should have been in the Acess forum....
Thanks "TedT" wrote: Hi, I have a simple check keeping database that also prints out checks on laser single sheet checks. I created a form to enter the check data, and then a form to print the check. This print form only has the pertinent info and is spaced to fill in the blanks on the laser check. It worked fine until I added a second check record. Now when I hit the print button, it always prints all the records. I want it to print the record data that is in the "EnterCheck" form in the "PrintrCheck" form. Here is the current code that does the printing and is run when I click on the print button on the "EnterCheck" form, I have not been able to get it to only print the data which is displayed in the current form. Private Sub PrintCheck_Click() Dim stDocName As String Dim MyForm As Form stDocName = "PrintrCheck" Set MyForm = Screen.ActiveForm DoCmd.SelectObject acForm, stDocName, True DoCmd.PrintOut DoCmd.SelectObject acForm, MyForm.Name, False End Sub |
All times are GMT +1. The time now is 11:09 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com