I dette særtema ser vi på, hvordan cloud og AI bliver fundamentet for virksomhedernes digitale forretning, og hvordan de nye muligheder for automatisering og forretningsværdi kan udnyttes uden at miste overblik, sikkerhed og menneskelig kontrol.
You should be able to add a communications control from the Toolbox.
Its called Microsoft Communications Control, version .....
You add a control to a form and if you then look under Tools+references menu you will see the control is now referenced.
Example of using the control named mscomm1 which you added to the form
Private Sub Form_Load () ' Buffer to hold input string Dim Instring As String ' Use COM1. MSComm1.CommPort = 1 ' 9600 baud, no parity, 8 data, and 1 stop bit. MSComm1.Settings = "9600,N,8,1" ' Tell the control to read entire buffer when Input ' is used. MSComm1.InputLen = 0 ' Open the port. MSComm1.PortOpen = True ' Send the attention command to the modem. MSComm1.Output = "ATV1Q0" & Chr$(13) ' Ensure that ' the modem responds with "OK". ' Wait for data to come back to the serial port. Do DoEvents Buffer$ = Buffer$ & MSComm1.Input Loop Until InStr(Buffer$, "OK" & vbCRLF) ' Read the "OK" response data in the serial port. ' Close the serial port. MSComm1.PortOpen = False End Sub
Private Sub Command1_Click() Dim mscomm1 As MSComm
Set mscomm1 = New MSComm
Dim Instring As String ' Use COM1. mscomm1.CommPort = 1 ' 9600 baud, no parity, 8 data, and 1 stop bit. mscomm1.Settings = "9600,N,8,1" ' Tell the control to read entire buffer when Input ' is used. mscomm1.InputLen = 0 ' Open the port. mscomm1.PortOpen = True ' Send the attention command to the modem. mscomm1.Output = "ATV1Q0" & Chr$(13) ' Ensure that ' the modem responds with "OK". ' Wait for data to come back to the serial port. Do DoEvents Buffer$ = Buffer$ & mscomm1.Input Loop Until InStr(Buffer$, "OK" & vbCrLf) ' Read the "OK" response data in the serial port. ' Close the serial port. mscomm1.PortOpen = False
Hej terry Har forsøgt det du har vist, men kan stadig ikke få det til at virke... :-( Jeg får en licens-fejl når jeg forsøger at indsætte MSComm-komponentet i en Access-formular.
I suspect that it isnt registered, and if it isnt you more than likley dont have a license for it! I think it is included with VB 6.0 NOT Access.
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.