标签打印需要帮助 [英] Label Printing Help required

查看:103
本文介绍了标签打印需要帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

由于我是VB6新手,我想为我的销售点系统创建标签打印,我需要
一个数据报告表,一次又一次地(行方式)打印标签我想要复制特定条形码的次数。如下图所示。

As I am new to VB6 I want to create a label printing for my Point of Sale system,
I need a data report sheet to print the labels again and again (row wise) as much times i want to make copies of a specific barcode. as showng in figure attached below.

这是我的代码

Option Explicit
Private Sub btnprnt_Click()
Dim qty As Integer
Dim A As Integer
Dim numcopies As Integer
qty = txtcopies.Text
On Error Resume Next
    'Check if the barcode field is blank
        If txtbarcodes.Text = "" Then
            MsgBox "Please enter the barcode", vbInformation, "Barcode Error"
            txtbarcodes.SetFocus
            Exit Sub
        End If
        
        Set ac = New ADODB.Connection
        Set ar = New ADODB.Recordset
        

        ac.Open strConek
        
        With ar
            SQL = "Select *From tblproduct Where Barcode='" & txtbarcodes.Text & "'"
            .Open SQL, strConek, adOpenStatic, adLockOptimistic
        If .RecordCount >= 1 Then
            If !Barcode = txtbarcodes.Text Then
            
        SQL = "Select *From tblproduct where Barcode= '" & txtbarcodes.Text & "'"
            
            DE.rsproduct.Open SQL
     With printbarcode
    
            .Sections("Section1").Controls.Item("txtDescription").Caption = !Description
            .Sections("Section1").Controls.Item("txtUnitPrice").Caption = !UnitPrice
      
            Set .Sections("Section1").Controls.Item("Image1").Picture = LoadPicture(App.Path & "\Barcodes\" & txtbarcodes & ".jpg")
       For A = 1 To qty
      Call printbarcode.PrintReport(False, rptRangeAllPages)
    Next A
      DE.rsproduct.Close
      
      End With
      
        Else
            MsgBox "Barcode not found", vbInformation, "Record not found"
        End If
    Else
        MsgBox "No product exist in database", vbInformation, "Record not found"
    End If
        .Close
    End With
End Sub





我需要的样本:


The sample which I need:

推荐答案

嗨Hassan,

Hi Hassan,

欢迎来到MSDN论坛。

Welcome to the MSDN forum.

这个队列是关于vb.net的。我担心你关于VB6的话题不适合这里。我将把这个帖子移到主题论坛上。您可以通过以下链接找到正确的论坛:

http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/6a0719fe-14af-47f7-9f51-a8ea2b9c8d6b

This queue is about vb.net. I’m afraid that your topic about VB6 is unsuitable here. I will move this thread to off topic forum. You can find the correct forum with the help of this link: http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/6a0719fe-14af-47f7-9f51-a8ea2b9c8d6b.

很抱歉给您带来不便,祝您有个愉快的一天。

Sorry for any inconvenience and have a nice day.


这篇关于标签打印需要帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆