Populating A Barcode From Dropdown List Follow

Legacy Poster

Okay so here is my situation:

I have created a dropdown list from an excel file

[b]Excel File[/b]
[u]Item[/u] [u]Number[/u]
Blueberry 100
Strawberry 200
FooBerry 300

[u]VB code: [/u]

dim objConn
dim strConn
dim rs

strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\foo.xlsx;Extended Properties=""Excel 8.0;HDR=YES;"""

Public Function GetNames()
Dim strNames

Set objConn = CreateObject("ADODB.Connection")
objConn.Open strConn
Set rs = CreateObject("ADODB.Recordset")
Set rs = objConn.Execute("SELECT * FROM [Sheet1$]")

strNames = ""
do while NOT rs.EOF
strNames = strNames + rs.fields("Item") + vbCrLf

GetNames = strNames

End Function

I would like the NUMBER barcode to be populated with the corresponding Number based on an Item selection.
For example if I choose Blueberry from the dropdown menu then the NUMBER barcode will have a value of 100.

How can I accomplish this?


Ian Cummings
Comment actions Permalink

What you're wanting is essentially what a query prompt for a database connection gives you. Unfortunately a query prompt is only support by text input. Also we cannot workaround the limitation in this way because there is no OnChangeData event for the data entry form which could allow you to change the value of other data entry items based on the value of the pull down list.

We do plan to add this sort of functionality in a future release, but it isn't really supported at the moment.

The best solution would be to develop a VB.NET front-end application to act as the input form to take the data input in exactly the way you wish, and for it in turn to control BarTender via automation for printing the labels. See the below white papers for more information:



Please sign in to leave a comment.