Results 1 to 2 of 2

Thread: Reading from com port

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 1999
    Posts
    14

    Post

    How can i read from the comm port with code? I am wanting to put this code in access 2000. thanks,

    Dan

  2. #2
    Member
    Join Date
    Apr 1999
    Posts
    38

    Post

    To send and retrieve data to/from the comm-port, you need the MSComm Control

    First set the settings of the control (comm-port number,...)

    to send data:

    MSComm1.Output = "...." 'the command you want to send to the comm-port

    To retrieve data:

    dim ReceiveString as String
    ReceiveString = MSComm1.Input

    You can place this code in a loop to check constantly:

    do while doevents
    if len(mscomm1.input) > 0 then
    'data received
    end if
    loop

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width