Skip to main content

Search

Search

Drop Down Afterupdate Event?

Comments

1 comment

  • Avatar
    Shotaro Ito
    Hi Jujijime,

    There's no good method I can tell within BarTender's user prompt. If BarTender's query prompt have drop-down list, that would be a perfect solution.
    Usual solution is give Query Prompt value from another application, which has dropdown list.

    Use query prompt to select a record by job# list.
    To create query prompt,[url="http://www.seagullscientific.com/aspx/training-video-(reading-data-from-database).aspx"]set up database connection[/url] then
    in Database Connection setup > Query tab,
    create query condition like
    [sql]
    Fields | Operator | Criteria
    job# | = | New prompt...
    [/sql]
    in Query Prompts dialog shown, you can name the query prompt and set user prompt, default reply etc.

    Once you set query prompt, it asks you job# (before user prompt) to filter record at print. (No drop-down list in query prompt. only text box.)

    In user prompt, show selected record's field value on the prompt(editable or read only).
    Additionally you can enable user prompt in each record for some user-defined values.
    You can bring print quantity in from Prompt design view > Sub-string Toolbox at bottom right > Identical copy of label.

    If you need to add a drop-down box, you can specify query prompt value from other application (BarTender Automation Edition or above needed.)
    When you have query prompt of "QueryPrompt1" and want to set value "0007" from other application such as VB or Access.

    In command line, you can set by "/?<Query prompt name>=<Value>" option
    ex.
    [code]"C:\Program Files\Seagull\BarTender Suite\bartend.exe" /F="C:\format.btw" /P /?"QueryPrompt1"="0007"[/code]

    In ActiveX, you can do that by Value of QueryPrompt object.
    ex.
    [code]btFormat.Databases.QueryPrompts.GetQueryPrompt("QueryPrompt1").Value = "0007"[/code]

    For detail, please check BarTender online help's "Automating BarTender" part.

    Another thought is populate user prompt's drop-down list's options from database by VB script, then get record value in OnPostPrompt VBscript event.
    This is a bit complex method - some posts like [url="http://seagullscientific.invisionzone.com/index.php?/topic/201-vbscript-to-populate-a-dropdown-list/"]this[/url] or [url="http://seagullscientific.invisionzone.com/index.php?/topic/218-some-small-questions"]this[/url] might help.

    Hope it helps!
    0

Please sign in to leave a comment.