473,324 Members | 2,257 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Printing Label Problem

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
2 2270
"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

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: DBQueen | last post by:
I have a database which will be printing out labels for SMALL test tubes (1/4" high). We have yet to find a reasonably-priced printer (labelwriter) which can effectively print this on ROLLS of...
3
by: Grim Reaper | last post by:
I print mailing labels out of Access 2000 databases about 3 to 4 times a week. I have been having problems with one thing since I have been printing mailing labels. I print mailing labels by...
1
by: Pohihihi | last post by:
Hello NG. I am using System.Drawing.Printing NS to print few label style printouts. I figured out how the basics goes in that namespace but there are still few things that is holding me up from...
5
by: Tom | last post by:
I am converting an old application that was printing directly to a specialized printer device (i.e. a special label printer). It was doing this by opening a file with the file path of 'LPT1:' and...
3
by: Mika M | last post by:
Hi all! I have made an application for printing simple barcode labels using PrintDocument object, and it's working fine. Barcode printer that I use is attached to the computer, and this...
3
by: carlor | last post by:
Hi there, Our client has a requirement to print labels from the web site to a local printer. i.e. user logs onto web site and click a print button and the address is printed to a label printer...
6
by: Ron | last post by:
Hi, I know Access allows for easy construction of a report setup to print labels from a table/query, etc. I've done that one. It works pretty well for what I need. However, is there an...
1
by: =?Utf-8?B?R2VvcmcgRmxlaXNjaGVy?= | last post by:
Hello, I've got a problem which I can not locate. I will try to describe it and would be glad, if someone had an idea how to identify the cause of the problem. Situation: My application...
0
by: jinsatoemo | last post by:
Hello guys,i'm new here,nice to meet you all :-) I need some help in access,particularly in printing to label printers.I've developed a program that generate labels to print to a label...
0
by: Tim | last post by:
Our application has used this PrintersClass module for some time without a problem but some new Toughbooks have caused problems. We use laser printers, usually the default choice, and some label...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.