Q: How do I print the currently displayed records in a continuous or single form? The current form also has a corresponding subform, which should be printed together. I have a single number in a form, and there are several groups of data in the big subform. My report is a set of data pages, how can I print a data report with only one click to print the current ticket number? Answer:
Q: How do I print the currently displayed records in a continuous or single form? The current form also has a corresponding subform, which should be printed together. I have a single number in a form, and there are several groups of data in the big subform. My report is a set of data pages, how can I print a data report with only one click to print the current ticket number? Answer:
Problem:
Continuous or single form,HowPrintCurrentDisplayOfRecord?CurrentThe form also has the corresponding child form, which must be togetherPrintCome out
I have a single number in a form. There are several groups of data in the big subform. My report is a set of data pages.HowClickPrint, Can onlyPrintCurrentWhat is the data report of the ticket number?
Answer:
This problem is too simple and I will not explain it separately. Please go to the "order" form "in the Rose Sample DatabasePrintCode for clicking an event in the invoice button
SubPrintWaybill _ Click ()
'This code is created by the "command Button wizard.
On Error GoTo Err_PrintInvoice_Click
Dim strDocName As String
StrDocName = "waybill"
'PrintUse the "invoice filtering" Report to queryPrintCurrentThe invoice for the order.
DoCmd. OpenReport strDocName, acViewNormal, "waybill filtering"
Exit_PrintInvoice_Click:
Exit Sub
Err_PrintInvoice_Click:
'If the user cancels the operation, noDisplayError message.
Const conerrdow.cancelled = 2501
If (Err = conerrdow.cancelled) Then
Resume Exit_PrintInvoice_Click
Else
MsgBox Err. Description
Resume Exit_PrintInvoice_Click
End If
End Sub
Here, the DoCmd. OpenReport strDocName, acViewNormal, "waybill filter" parameter of "waybill filter" is a query name. The query code is as follows:
SELECT invoice .*
FROM invoice
WHERE (invoice. Order ID) = Forms! Order! Order ID ));
Refer to the OpenReport syntax.
Author: Unknown