Euphorbiaman
IS-IT--Management
Hi,
I have a form that loads from a menu option. A combo box on the form allows the nurse to choose a patients name. Once the name is chosen the form is populated with the patients data. The nurse wants to be able to print the current record from a command button at the bottom of the form. When the command button is clicked, instead of the current record printing all 1000+ records print. The form and report are based on the same select query. The query gathers data from 3 tables and SSN is the command field between all three tables. Both the report and form have subforms.
Here is the code:
Dim strReportName As String
Dim strCriteria As String
strReportName = 'New Report 6606"
strCriteria = [Forms]![New Main Form 6706]![SSN]
DoCmd.OpenReport strReportName, acViewPreview, strCriteria
Thanks for your help!
I have a form that loads from a menu option. A combo box on the form allows the nurse to choose a patients name. Once the name is chosen the form is populated with the patients data. The nurse wants to be able to print the current record from a command button at the bottom of the form. When the command button is clicked, instead of the current record printing all 1000+ records print. The form and report are based on the same select query. The query gathers data from 3 tables and SSN is the command field between all three tables. Both the report and form have subforms.
Here is the code:
Dim strReportName As String
Dim strCriteria As String
strReportName = 'New Report 6606"
strCriteria = [Forms]![New Main Form 6706]![SSN]
DoCmd.OpenReport strReportName, acViewPreview, strCriteria
Thanks for your help!