Newbie Questions
Hello all,
My name is Aaron and I am a hospital pharmacist at a small hospital and am new to Bartender. My immediate problem is I cannot find the sample labels to modify. When I installed the application the install samples box was checked, but there is nothing in the bartender folder. Below is an outline of my goals if anyone has a specific recommendation.
Goal: Technician prints serialized labels in small batches for non-patient specific vial labels that have medication specific instructions, strengths, etc.
Hardware: Zebra TLP 2844 printer, PC with Windows XP
Labels 3"X2.5" on a roll.
I have created a spreadsheet with all the information and successfully imported it, but am experiencing difficulty linking the data to a drop-down selection. I was hoping that I might find a sample that could be modified.
Any help is appreciated.
-
BarTender doesn't currently support connecting a drop-down list control to a database data source. This is in our feature request list.
1.- In BarTender there are currently two type of database record selection dialogs, one is called the "query prompt" dialog, where you actually need to directly write the query prompt value (no drop-down list selection), and then you also have the "record selection" dialog, where you get a view of your database (or a view of the query prompt selected records), and you just select which (and in what quantity) records you wish to print.
Both type of dialogs are explained in the following training video:
http://www.bartenderbarcodesoftware.com/label-software/training-video-(selecting-records-from-a-database-at-print-time).aspx2.- Find attached as well an example on how to make a query prompt selection by using a Drop-Down list. In order to test this label, copy the Excel spread sheet to the location “C:\Seagull”. First of all we have to populate the dropdown list using the data from a data source. To see this code click “Dropdown List Options”, select “List Items” and then the “Edit VB Script…” button.
You will notice the following code in order to populate the list.
Functions and Subs
dim objConn
dim strConn
dim rsstrConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='C:\Seagull\Drop down.xls';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 = ""
rs.MoveFirst()
do while NOT rs.EOF
strNames = strNames + rs.fields("Fruit") + vbCrLf
rs.MoveNext()
loop
GetNames = strNames
End Function
OnFillList
Value = GetNames()
The next thing that we have to do is to populate our other text objects based upon the data that has been selected in the drop down list via a query. The following code is in the second text object and displays the price, relating to the fruit that has been selected.
This is the code that populates the data for this object:
dim objConn
dim strConn
dim rsstrConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='C:\Seagull\Drop down.xls';Extended Properties=""Excel 8.0;HDR=YES;"""
Set objConn = CreateObject("ADODB.Connection")
objConn.Open strConn
Set rs = CreateObject("ADODB.Recordset")
Set rs = objConn.Execute("SELECT * FROM [Sheet1$] WHERE Fruit = '" & TextFruit & "'")
Value = rs.fields("Price")
3.- With regards to the BT sample documents, none of the samples will show you how to perform a Drop-Down list with database source items, but you should find these samples under "C:\Users\$User Name$\Documents\BarTender\BarTender Documents". If they don't appear, then try to reinstall BarTender just in case.
0
Please sign in to leave a comment.
Comments
1 comment