By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,389 Members | 2,052 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,389 IT Pros & Developers. It's quick & easy.

Printing Label Problem

P: n/a
I have a form on to which I have added a button that will cause only that
form to be printed as a Bin Label. It works fine but it does not release
when it finished printing the current record. If I simply move to the next
record, it will go ahead and print that form and so on and so on. Under
"Properties ->Event->On Enter" I have the following code.

Private Sub PrintBinLabel_Enter()
Dim strDocName As String
Dim strWhere As String
strDocName="RptBinLabel"
strWhere="[SlideLotNumber]='"& Me!SlideLotNumber & '""
DoCmd.OpenReport strDocName, acViewNormal, , strWhere

End Sub

Can some kind person give me the additional code that will close the print
function for the above Bin Label, when it is done.

Thank you,

Bill.

Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"William Bradley" <br******@magma.ca> wrote in message
news:Dc********************@magma.ca...
I have a form on to which I have added a button that will cause only that
form to be printed as a Bin Label. It works fine but it does not release
when it finished printing the current record. If I simply move to the next
record, it will go ahead and print that form and so on and so on. Under
"Properties ->Event->On Enter" I have the following code.

Private Sub PrintBinLabel_Enter()
Dim strDocName As String
Dim strWhere As String
strDocName="RptBinLabel"
strWhere="[SlideLotNumber]='"& Me!SlideLotNumber & '""
DoCmd.OpenReport strDocName, acViewNormal, , strWhere

End Sub

Can some kind person give me the additional code that will close the print
function for the above Bin Label, when it is done.

Thank you,

Bill.

Why is the code written for an Enter event? If PrintBinLabel is a button,
usually you write code in the Click event. If you can, you also name your
controls so that other people recognise what they are.

I would have named the command button "cmdPrintBinLabel" and would have had
the code in here:

Private Sub cmdPrintBinLabel_Click()
' ...
' code here
' ...
End Sub
Fletcher
Nov 12 '05 #2

P: n/a

"Fletcher Arnold" <fl****@home.com> wrote in message
news:bn**********@hercules.btinternet.com...
Why is the code written for an Enter event? If PrintBinLabel is a button,
usually you write code in the Click event. If you can, you also name your
controls so that other people recognise what they are.

I would have named the command button "cmdPrintBinLabel" and would have had the code in here:

Private Sub cmdPrintBinLabel_Click()
' ...
' code here
' ...
End Sub


Thank you Fletcher, I simply changed it to a "click" even and that solved
the problem.

Bill
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.