Checking For Queryprompt Errors
I need some help error checking if I enter wrong data.
Original Bartender Scenario: bartender had a queryprompt that would ask the user to enter a part number . If the user enters a part number that is not in the database they get a message box telling the user that no record was found. they could close the message box and re enter the right part number.
Current Scenario: I am writing a vb.net app with a textbox for the user to enter the part number. If they enter a bad part number it just does not print a label, You get no message or error letting you know there is a problem with the part number. this is alright but I would prefer to be able to display a message box that tells the user they have entered a bad part number.
Question: Is there a way to in my VB.net code to check for the queryprompt error if it occurs ? or am I going to have to use vb.net code that will check against my excel table before it gets the print command.
Thanks for any help that could be offered.
-
Probably the easiest way to do that would be to use the Messages class and look for error 3200 'No Records Found'. Since it is an error you could try the 'GetError' enumerator to notify you of errors as well.
0
请先登录再写评论。
评论
1 条评论