Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing Dymo Labels

Status
Not open for further replies.

DrillMonkey

Technical User
Sep 29, 2006
64
US
Hi,

I'm using a form/sub form to print Shipping label(s) and a single report. The user fills in fields on the main/sub form including TotalParcels, the value in the "TotalParcels" is passed through code, and a corresponding number of shipping labels are printed including a single report "Delivery Memo" this is not working the way I expect. Sometimes it gives me the correct number of labels other times it more then I expect. I was hoping someone might see a problem in the code. The report seems to be ok..Thanks for your help.

Code:
 Private Sub Command11_Click()
Dim strWhere As String
Dim L As Long

    If Me.Dirty Then    'Save any edits.
        Me.Dirty = False
    End If

    If Me.NewRecord Then 'Check there is a record to print
        MsgBox "Select a record to print"
    Else
        strWhere = "[MemoID] = " & Me.[MemoID] 'This code prints a report to default printer
              DoCmd.OpenReport "rptMemo", acViewNormal, , strWhere
        
        For L = 1 To Me!TotalParcels 'This code prints to optional Dymo Labelwriter
               DoCmd.OpenReport "rptMemoDymo", acViewNormal, , strWhere
        Next L
        
    End If
End Sub
 
This might be better if broken down into 2 command buttons instead of a single print button. Maybe a Dymo print button.
 
Here is my two cents:

Penny #1) if the extra labels are blank, there is a formatting problem causing the DYMO label to spill onto 2 pages (labels).

Penny #2) Your [MemoID] is not as unique as yo think it is, or you have multiple records that you are unaware of.
 
Hi Kzutter,

I wasn't getting any blank labels..but I decided to add a dymo print button besides the button I use to print the report..I also realized that in my form/subform, I only needed the parent portion of the data for my SQL statement in the reports control source...sheesh Dymo is running as expected now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top