After working throughout last night on the serial USB Port to find out exactly what was causing Ms Access to hang/restart before finishing the second invoice,I discovered fortunately the main issue,Firstly, I had to use the note pad to divert the actual data that was coming out from the gadget to analysis it line by line including the commas & other characters and the results after comparing it with the gadget manual provided turned out as below:
(1) The QR code details were missing or not coming out of the gadget
(2) The CRC was also missing
(3) The closing Braces & Square brackets were also missing
Conclusion only 90% of the data were being extracted from the port leaving 10% inside, that is why Ms Access had a problem of hanging/restarting.
Help required
Extra VBA code to loop through the CommRead Function to force all the data to come out of the serial port before process any data and writing to the table. I'm trying the code below but it appears I'm missing it somewhere:
CommRead Function
' Read maximum of 2034 bytes from serial port. lngStatus = CommRead(intPortID, strData, 2036) 'Do loop Do While lngStatus > 0 If lngStatus < 0 Then Exit Do Set json = JsonConverter.ParseJson(Chr(91) & Mid(strData, 8) & Chr(34) & "}" & Chr(93)) On Error Resume Next End If Loop
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
-Mike Kapnisakis, Warner Bros
With your subscription - you'll gain access to our exclusive IT community of thousands of IT pros. You'll also be able to connect with highly specified Experts to get personalized solutions to your troubleshooting & research questions. It’s like crowd-sourced consulting.
We can't always guarantee that the perfect solution to your specific problem will be waiting for you. If you ask your own question - our Certified Experts will team up with you to help you get the answers you need.
Our certified Experts are CTOs, CISOs, and Technical Architects who answer questions, write articles, and produce videos on Experts Exchange. 99% of them have full time tech jobs - they volunteer their time to help other people in the technology industry learn and succeed.
We can't guarantee quick solutions - Experts Exchange isn't a help desk. We're a community of IT professionals committed to sharing knowledge. Our experts volunteer their time to help other people in the technology industry learn and succeed.
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Fellow title is reserved for select members who demonstrate sustained contributions, industry leadership, and outstanding performance. We will announce the experts being inducted into the Experts Exchange Fellowship during the annual Expert Awards, but unlike other awards, Fellow is a lifelong status. This title may not be given every year if there are no obvious candidates.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.