Zum Hauptinhalt gehen

Suche

Suche

VBScript Unabled to get field values from excel using built-in codes

Kommentare

4 Kommentare

  • Avatar
    Peter Thane

    Try editing the VB script for the field so that it is an Event Controlled Script set to OnNewRecord as this will force the VB to use the data taken from the database at print time when a new database record is selected

    0
  • Avatar
    Travis Su

    Peter Thane,

    Is it possible to iterate the connected db record to match specific one with the value?

    My approach is there will be a textbox accepting the value by barcode scanner, which will be a customized serial number consisting product code which in.

    Example: SG0711AB11E000001, where 0711A is the product code.

    I wanted to use VBscript to substring the '0711A' out (hence the Mid() code above) and iterate the db finding the matching row, then output other data in that row.

     

    is it possible? That way I don't have to select the record in order to retrieve the value

    0
  • Avatar
    Peter Thane

    Okay, if you are needing to strip out part of the input to use the rest for the lookup then you can use the More Options via the Filter/Database Query Prompt setup

    0
  • Avatar
    Travis Su

    Peter Thane

    Peter,

    Just tried the character filter. I don't know how to filter out the characters before the target character I.e. SG

    But while the prompt worked in some way, I've managed to tie it to the database and print stuff. But I could not able to print the rest of the Serial Number.

    Of course, I can tie the query prompt entry value to the Serial Number field, but If the filter is in place, it would not be a complete Serial Number. If used it without the filter, a complete Serial Number entry would not be able to find a matching row because it uses the complete serial number to search against the database which of course will return nothing. Or maybe I'm using it the wrong way?

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.