Accept Empty Value For Filter Textbox Using Vb Script Follow

0
Avatar
Legacy Poster

Hi  there,

 

I would like to print label from excel database.  So far, it works perfect. I have added a query prompt to help me filter the records.

But i would like also the users can skip the filtering parts. Currently, if i leave the text box blank for filter, it would have error.

 

I would like to make it to detect if the textbox is blank then proceed to show the lists of whole records. Users can choose which records they would like to print.

 

Can VB script help me on this?

 

I'm using Bartender Automation Edition 10.1 SR3.

 

Thanks.Any help is appreciated.

3 comments

0
Avatar
Ian Cummings
Moderator
Comment actions Permalink

What sort of operator are you using with your query?

 

I would recommend you update to SR4 as a matter of course: http://www.seagullscientific.com/label-software/fixes_101.aspx

0
Avatar
Legacy Poster
Comment actions Permalink

Hi Ian C,

 

Thanks for the reply.

 

For filtering, i use query prompt in database Bartender.

 

I'm using query as below,

 

($Sheet1.PartNumber = ?QueryPrompt1)

 

This will pop up an entry form to let me enter the part number and will filter the records.

 

If the users left it blank, it will show all the records. (Currently, an error message will definately show up when leave it blank)

 

I think vb script can help me on it. Would need advice on it.

 

Thanks. 

0
Avatar
Ian Cummings
Moderator
Comment actions Permalink

Have you tried using the "Begins with" operator, and teamed that up with the "Select at print time" record selection dialog.  This is normally a good configuration for the sort of behaviour you want.

Please sign in to leave a comment.