I have developed a POS sytem using Microsoft Access. I am using MSComm to transmit information to a pole display, which works fine. I have different forms that needs to send information to the Pole Display. I would like to work with only one form that has MSComm controls. So, I created a form and called it CommForm, and I called the MSComm control commpd. I created another form with a command button and I paste the attached code to it. When I click on the command button, I get the following message: Run-time error '91' Object variable or with block variable not set. I don't know what commands I am missing. Can someone please help.
Private Sub Command0_Click()
If CommForm.commpd.PortOpen = False Then
CommForm.commpd.PortOpen = True
Dim s As String
s = "testing"
CommForm.commpd.Output = s