Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSComm with Access

Status
Not open for further replies.

ZOR

Technical User
Jan 30, 2002
2,963
GB
Probably will get shot posting this on two sites, but saw activity here on the subject - appologies

I have a form which gets data into Access. Its double dutch to me in this area. I am trying to combine the operations of two forms in one. The form I am trying to amalgamate has a Form_Load procedure below:


MSComm1.PortOpen = True
inpclear = MSComm1.Input 'Clear any pending interrupts
DoCmd.GoToRecord , "Tape Log", acNewRec
TCStart.SetFocus
intWait = 20 'Set delay for timer routine

I don't want ports open or communications until I want them. Am I correct I could put this into a command button for when wanted, and have another when I have finished like below, or is it not as easy as that? Thanks

inpclear = MSComm1.Input 'Clear any pending interrupts
MSComm1.PortOpen = False

Not sure what I do about the timer, hopefully its dead.
 
Have you tried it out that way to see? I would think it's worth a shot, and just do some troubleshooting for any possibilities of the users' actions, in order to make sure that you don't cause any problems. It could be that the first person didn't know best where to put it, and so stuck it in the Form_Load() event.
 
Thanks, I will give it a shot. Just having problems on my PC as it does not have the MSComm32.ocx installed, will try my other PC thats got problems with VB6 having installed it after XP, I think MSComm32.ocx resides within VB6. Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top