Alpha Video Training
Results 1 to 6 of 6

Thread: Opening form, not opening to correct record

  1. #1
    W. Horton
    Guest

    Default Opening form, not opening to correct record

    I use a central database to store main data. There are several other databases that track various other data related to the main data. I start with the main database, displaying a form to show the correct record. Then I can select one of the other databases to view the related data. In version 1, I used the card_spawn command to locate and display the correct record, in version 4.02, I have to use :form.view to display the record with the ability to display global data, BUT the form will not lock onto the correct record, even when located by fetch_goto or fetch_find just prior to displaying the form. i cannot find the syntax for :form.view() that may include the record number that I want to display when the form displays.

    In version 1, when using the card_spawn command, you could specify a record number, in version 4, the card_spawn command works, BUT global data does not display.

  2. #2
    "Certified" Alphaholic
    Real Name
    Thomas Patten
    Join Date
    Apr 2000
    Location
    Duluth, MN
    Posts
    1,494

    Default RE: Opening form, not opening to correct record

    You might try a variation of the following:

    t = table.current() 'OR (2)
    rec = t.recno()
    f= :form.load("YourFormName") ',"Dialog") or open as dialog
    f.index_set("")
    f.find(rec)
    f.activate()
    f.show()
    'f.close() 'if opened as dialog
    'Parentform.resynch()

  3. #3
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default RE: Opening form, not opening to correct record

    W.

    Instead of using form.view() to open the called form to view child table records, use form.load(). This loads it into memory, where you can play with it before it appears on screen. Once loaded you can set the controlling index, and do a fetch_find to locate a particular record, or you could even run a query to display only a subset of the entire table. All of this will occur before you activate and show the form on screen. The command is discussed in Ch 13 of the xbasic reference manual.

    Version 4.02 is badly out of date. You should consider updating to vers. 4.5.

    -- tom

  4. #4
    W. Horton
    Guest

    Default RE: Opening form, not opening to correct record

    thank you, i'll try it.


    Warren

  5. #5
    W. Horton
    Guest

    Default RE: Opening form, not opening to correct record

    thank you too, i'll try it.


    Warren


    we are looking at v5, but the county is slow in buying it.

  6. #6
    Member
    Real Name
    gfong
    Join Date
    Jan 2001
    Location
    Dartmouth, Nova Scotia, Canada
    Posts
    369

    Default RE: Opening form, not opening to correct record

    Funny thing that you hit this problem. Try the form.load option as opposed to the form.view and do a resynch() prior to the show() command.

Similar Threads

  1. Opening a form - Goto last record
    By johngt in forum Alpha Five Version 5
    Replies: 13
    Last Post: 04-05-2004, 05:35 PM
  2. Opening a form to "New Record"
    By Sholom Hamada in forum Alpha Five Version 5
    Replies: 20
    Last Post: 08-20-2003, 06:01 PM
  3. Opening form for new record
    By Alan Anthony in forum Alpha Five Version 5
    Replies: 3
    Last Post: 01-01-2003, 06:14 AM
  4. Opening form on new record
    By Nick Perez in forum Alpha Five Version 4
    Replies: 3
    Last Post: 05-28-2000, 08:20 AM
  5. Opening Form on Record Specified from Form
    By Rich Williams in forum Alpha Five Version 4
    Replies: 3
    Last Post: 04-24-2000, 01:50 PM

Bookmarks

Posting Permissions

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