J
jeanhurtado
Hi I'm Jean and well I making a database project. I have the following
issue:
I want to print a record entering a "Asset Number" filed (This field
is the PRIMARY KEY) in a input box and then print the entered record in
a Report. I have the code to print the current record in a report but I
don't know how to customize that code to use the entered data(input
box) as the record that I want to print.
Example:
Private Sub PRINT_REPORT_Click()
Dim strReportName As String
Dim strCriteria As String
strReportName = "ASSET REPORT"
strCriteria = "[ASSET NUMBER]='" & Me![ASSET NUMBER] & "'"
DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
End Sub
Thanks in advance for all. Have a nice day.
sincerely your's
Jean C.
issue:
I want to print a record entering a "Asset Number" filed (This field
is the PRIMARY KEY) in a input box and then print the entered record in
a Report. I have the code to print the current record in a report but I
don't know how to customize that code to use the entered data(input
box) as the record that I want to print.
Example:
Private Sub PRINT_REPORT_Click()
Dim strReportName As String
Dim strCriteria As String
strReportName = "ASSET REPORT"
strCriteria = "[ASSET NUMBER]='" & Me![ASSET NUMBER] & "'"
DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
End Sub
Thanks in advance for all. Have a nice day.
sincerely your's
Jean C.