Presently I am using the following code, as the "onClick" event of a Form
Action button. What it does is print out a single report of the record that
is presently on the screen only. It works fine, it simply prints out the
record on the screen when the Form Action button is selected, without
asking any further questions.
Private Sub PrintBinLabel_()
Dim strDocName As String
Dim strWhere As String
strDocName = "RptProductionTable"
strWhere = "[LotNo] = ' " & Me! LotNo & " ' "
DoCmd.OpenReport strDocName, acViewNormal, , strWhere
End Sub
The problem that I am now facing is that the company is now using the same
"LotNo" for two or three or more runs. So now, when the Form Action button
is selected, it will print out all the lot numbers that are the same. For
example if there is three records 4121, it will print out three reports.
The company now differentiates each "LotNo" with a "LotRunNo" or a
"ProdCode". So my question is, how do I alter the above formula, using
either the "LotRunNo" or the "ProdCode", that will then print out only the
record that is on the screen.
As always, any help would be appreciated.
Bill.
--
William Bradley
Come visit us at:
http://www.catholicmissionleaflets.org
Free Rosaries available at the above.