Trouble With Excel 2010 And Bartender 10 关注

0
Avatar
Legacy Poster

I've been trying to use an Excel spreadsheet to use a number inputted from the Data entry form to search through one column and return from the next column the same record line. When I run a print preview,it returns only the top record of the column. I've tried using a VBScript, Excel functions, all with the same result. Below is the script I've been trying to use as well as the label. Any help would be greatly appreciated.

 

If Field("Sheet3Fabric$.Mil 1")= Field("Sheet3Fabric3$.Mil 2") Then
loopCount = 3
Do while not isempty(objExcel.Cells(loopCount, 1).Value)
For i = 7 To 8
value = CurDir(loopCount, i).Value
Ifelse
loopCount
= loopCount + 1
Do
Loop
If("Sheet3Fabric$.Mil 1")= Field("Sheet3Fabric$.Mil 2")Then
Return value
Else
value = value
End If
objExplorer.document.body.innerHTML = value

Close


Exit If
Exit Sub
Exit Do
Exit Then

5 评论

0
Avatar
Fernando Ramos Miracle
版主
评论操作 固定链接

Hello Lathamlee

 

Instead of using a VB script to filter the database, why don't you use our Query feature? Following the below link you'll find a training video on how to use it (among other methods to select records at print time):

 

http://www.seagullscientific.com/label-software/training-video-(selecting-records-from-a-database-at-print-time).aspx

 

Regards.

0
Avatar
Legacy Poster
评论操作 固定链接

Fernando; Thanks for the quick response! I viewed the video, my question is when I try to add a second prompt and a third prompt, only one shows up before the Data Entry Form does. How do I get multiple prompts to appear?

0
Avatar
Domingo Rodriguez
版主
评论操作 固定链接

I've attached a screenshot on how 2 query prompts would look like on BarTender's database connection setup dialog. Is this how you've set them up?

0
Avatar
Legacy Poster
评论操作 固定链接

thanks Domingo, Yes i can create multiple prompts, the problem is the user only inputs a single number like: 128015wht00500. From that number with trucation four fields are populated, 128 =Item,015=thickness,wht= color and 00500 = width. The user isn't knowledgable of the breakdown so I can't create individual prompts. Ahead of time, I thank you for your help

0
Avatar
Domingo Rodriguez
版主
评论操作 固定链接

In this case you would need to automate BarTender via a third party application (via our .NET SDKs e.g.) which will divide this single number into separate query prompts, and you then assign to each query prompt created in BarTender its corresponding value: http://www.seagullscientific.com/label-software/whitepapers/controlling-barcode-label-software-using-c-sharp-and-vb.net(english).pdf

 

With VBScript you might be able to achieve it (if the result of the query prompt only returns one record), but in my opinion developing a small front-end is much more professional and also much easier.

请先登录再写评论。