Alpha Video Training
Results 1 to 3 of 3

Thread: Pop-up window

  1. #1
    Ian Adam

    Default Pop-up window

    I'm a novice, please bear with me.

    I have a database with a 1 character field (P or O, Paid or outstanding)
    When payment is received I want to click on a button which pops up a window
    (I can do this).
    The window should include a type in field (order number), a 'Go' button
    and a 'Cancel' button.
    When the window pops up, the type in field should have the cursor in it so that I only have to type (and not click on the field first).
    Once I have typed in the number, I click on 'Go', the relevant item is found and the 'O' is changed to 'P'.

    I've managed most parts, but I can't get the window to pop up with the cursor in place.

    Can anyone help, please?

  2. #2
    Jake Vuckovic

    Default RE: Pop-up window

    Now that we can attach files to the messages, it is much easier to show an example that explain. I have created a small app that does exactly what you describe.
    Just make sure your table is indexed by order number.
    In the example I used inv_no for the field name, and index is also inv_no.

    I hope you can make use of this.

  3. #3
    Jake Vuckovic

    Default RE: Pop-up window

    Hi Ian,
    I tried to respond to your email, but it was rejected. Is your email address correctly set?

    Here is what I wrote, I hope it doesn't get scarmbled here:

    Hi Ian,

    Here is how it works:

    You design the form (Payment), click on "V" while in design mode, and define
    global variable (inv_no in my example) as character (since inv_no in the
    table is character field). You place this variable field on the form. Now
    add two buttons("Go" and "Cancel") on the form using button genie if you
    want. Specify that you want to close current form with each button. No other
    code needed on the buttons. All we want to do on this form is set the value
    of the global variable "inv_no". That's why both buttons have the same
    action. We just want to close the form, nothing else.

    Back to the "Invoices" form. You place one button on it, "Payment", and
    place action script like the one in the example. As I said, your table has
    to be indexed on inv_no (order_no) field for this to properly find correct

    dim global inv_no as c
    tbl = table.current()
    tbl.index_primary_put("Inv_no") 'set primary index to inv_no
    form.view("Payment","dialog") 'load Payment form as dialog
    last_button = :Payment.last_pressed() ' find out what was the last button
    pressed on Payment form
    if last_button = "button1" then 'if last button pressed was button1(go)
    rec = tbl.fetch_find(inv_no) 'find invoice number that was typed into
    global variable "inv_no" on Payment form
    if rec

Similar Threads

    By Juanita in forum Alpha Four Versions 7 and 8
    Replies: 4
    Last Post: 02-07-2005, 03:40 AM
  2. pop up window
    By Rob Penney in forum Alpha Five Version 4
    Replies: 2
    Last Post: 11-04-2004, 10:43 PM
  3. Popup Window
    By Amir Bienstock in forum Alpha Five Version 5
    Replies: 1
    Last Post: 06-29-2004, 05:22 PM
  4. Window Bar
    By Peter.Greulich in forum Alpha Five Version 5
    Replies: 2
    Last Post: 02-22-2004, 08:45 AM
  5. Can't window Alpha 5
    By Ronald Anusiewicz in forum Alpha Five Version 5
    Replies: 8
    Last Post: 01-07-2003, 05:49 AM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts