giúp tui đoạn code vb trong access lấy dữ liệu từ đầu cân Indicator MettLer-Tole nhé

Collapse
X
 
  • Giờ
  • Show
Clear All
new posts
  • controlufo
    Nhập môn đệ tử
    • Apr 2007
    • 4

    #1

    giúp tui đoạn code vb trong access lấy dữ liệu từ đầu cân Indicator MettLer-Tole nhé

    đoạn của bạn ngohaibac đem áp dụng sài không được trong access
    form nhap
    texbox vao


    Dim x As Variant

    Private Sub Form_Load()
    On Error Resume Next
    With MSComm1
    If .PortOpen = True Then .PortOpen = False
    .CommPort = 2
    .Settings = "9600,N,8,1"
    .InBufferSize = 2000
    .InputLen = 0
    .OutBufferSize = 64
    .PortOpen = True
    End With
    End Sub

    Private Sub Timer1_Timer()
    Timer1.Enabled = False
    MSComm1_OnComm
    Timer1.Enabled = True
    End Sub

    Private Sub MSComm1_OnComm()
    With MSComm1
    If .InBufferCount >= 1 Then
    x = MSComm1.Output
    Forms!nhap!vao = x
    End If
    End With
    End Sub



    tui có gửi file access kèm theo mong các bạn déign lại dùm
    mong hồi âm
    xin chân thành cám ơn
    Attached Files
Working...