Vb Script Sorting Follow

0
Avatar
Legacy Poster

Dear Sir,

 

I am newbie for bartender VB Script. I want to create the Data Entry form to let the user to sort the item from excel and choose the number of printing copy when they are printing.

For example, I want to sort all "Hong Kong" in Location to print.

2 comments

0
Avatar
Legacy Poster
Comment actions Permalink

I want to do the same operation.  Waiting for Help. thank you.

0
Avatar
Shotaro Ito
Comment actions Permalink

Hi fongko,

You cannot use Data Entry Form's Dropdown list to select a connected database's record.

Dropdown list is to select just a field.

 

To sort connected database, from File > Database Connection Setup,

Select the database (ex. tiffany), then from [Sort] tab, specify soft fields (ex. Sheet1$.Store Location).

 

If you're not intended to use Database connection and just want to sort dropdown list,

in VB Script, modify line 15 like below

(sort by "Store Location" in ascending order)

Set rs = objConn.Execute("SELECT distinct [Store Location] FROM [Sheet1$] ORDER BY [Store Location] ASC")

Please sign in to leave a comment.