Programming Symbol 4208 Barcode Scanner using ADF rule

I have a retail client that I am designing a custom application for in VFP 9 that will utilize scanned barcodes to update received purchase orders.  I am using a third party Active X control from ID Automation in an OLE container on the VFP form, the barcode scans the ASCII output of the barcode to a text box on the form in this case it is a purchase order number. The program then queries an SQL database to return the line items of the PO into a grid on the form.  Based upon a condition of the ASCII string returned,  for example if the left two digits of the value returned from the scanner does not equal 'PO' the application pops up a messagebox that indicates the scanned value is not a valid PO number, in the case the end user scans a barcode that is not a valid PO.  But I also want the scanner to beep twice if this condition is not met so it alerts the person scanning the barcode there is a problem in the case they are not looking at the computer....presently the scanner beeps once after a succesful decode and in this case if the left two digits of the ASCII output does not equal 'PO' I want the scanner to beep twice or three times.  I have played around with the ADF rules in the 123SCAN application that comes with the scanner but I am unable to create an ADF rule that will allow me to accomplish this.  Does anybody have any experience with the ADF rules in the 123SCAN.EXE application?  Is there a way accomplish this?  
LVL 11
Who is Participating?
Patmac951Author Commented:
Well since I received no feedback....I was forced to figure it out my self. This is what I did within the 123SCAN application I created 3 ADF Rules.  
Rule 1 Looked for the string 'PO' begin at postion 1 (valid PO Number), then Skip to Start, Send All that remains, Send Extended Key (Enter)
Rule 2 Looked for the string '-' at postion 8 for the (Valid "Receive-Post") barcode, then Skip to Start, Send All that remains, Send Extended Key (enter)
Rule 3 - Basically wide open criteria any other barcode scanned that did not contain the 'PO' or '-' characters ( which are the only valid barcodes defined for this custom application). Then Beep twice, Send All that remains, Send Extended Key (enter)

The ADF rules work similar to case statements in programming language, Rule 1 is equal to the first case statement, Rule 2 is the second case statement and Rule 3 is an otherwise catch all rule if the data in the barcode does not meet either Rule 1 or Rule 2.
Justin OwensITIL Problem ManagerCommented:
It is good information, and someone might be able to use it in the future.  I would ask that you accept your own answer rather than delete the question, but that is a personal preference.

Happy New Year,

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.