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