Alpha Video Training
Results 1 to 7 of 7

Thread: Form does not exist

  1. #1
    Member
    Real Name
    Alan Anthony
    Join Date
    Jun 2015
    Posts
    4

    Default Form does not exist

    I have a form "Delete Property" that is based on a table and is called by a button on the "Main Menu". I duplicated the form and changed the name and made many changes. I also modified the button on the "Main Menu" to go to the new form. However, it errors with the message that the OLD form does not exist. I also tried changing the name of the original form and it also got an error. What am I missing?

  2. #2
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,628

    Default Re: Form does not exist

    What you have described should work.

    So something else is missing.

    Can you post an example that shows the issue?

    When you change the main menu, you need to save the code and then save the main menu form.

    btw, welcome to the Alpha message board.
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  3. #3
    Member
    Real Name
    Alan Anthony
    Join Date
    Jun 2015
    Posts
    4

    Default Re: Form does not exist

    Thank you Al, it has been awhile. I have attached some screen snags showing the problem. GR Main Menu has a button which calls "Property Main Menu". Shown on the "Forms" snapshot is the form "Edit Property V2" which I duplicated as "Delete Property". In the "Change Name" snapshot it shows I changed the "Delete Property Records" button to point to the new "Delete Property Record" form. I saved both the script and the form. When the "Delete Property Record" button is pressed, the error message pops up. It does that 3 times and then goes to the new form. Any ideas?

    Thanks,
    Alan
    Attached Files Attached Files

  4. #4
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: Form does not exist

    Do you have some code in the form's events that references the form by object name?

    I just tested renaming a form after creating a button to open it. The error message I received was

    Form not found "Old Form Name".

    Which is of course different from your the object does not exist.............
    There can be only one.

  5. #5
    Member
    Real Name
    Alan Anthony
    Join Date
    Jun 2015
    Posts
    4

    Default Re: Form does not exist

    The "Delete Property Records" only has the OnPush event which opens the "Delete Property" form. However, the "Delete Property" form had OnInit and OnActivate events and each had "Show All Records" and "Disallow Edits". I removed them and it now works. Why would they cause that error? My production database has those events and it works fine - when I duplicated the form and changed it is when the error occurred. ??????????

  6. #6
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: Form does not exist

    The xbasic behind the scenes of an Action Script element to Show All Records can be written different ways in different versions. In V10, which I don't have access to at the moment, it could have referenced the form "object name". Renaming the form did not change the object name to match so when the Show All Records attempted to execute the object could not be found.

    This is generally avoided by using relative addressing such as

    topparent.show_all() or parentform.show_all()

    instead of

    formobjectname.showall()

    Not saying you did this, just that it can happen.
    Last edited by Stan Mathews; 10-20-2016 at 01:45 PM.
    There can be only one.

  7. #7
    Member
    Real Name
    Alan Anthony
    Join Date
    Jun 2015
    Posts
    4

    Default Re: Form does not exist

    Stan......... Thanks for taking the time to explain - that makes sense.

    Alan
    Last edited by aanthony13; 10-19-2016 at 04:57 PM.

Similar Threads

  1. form does not exist error
    By dik_coleman in forum Alpha Five Version 5
    Replies: 3
    Last Post: 07-05-2006, 12:48 PM
  2. if a client doesnt exist open client form
    By Lance Gurd in forum Alpha Five Version 7
    Replies: 11
    Last Post: 02-25-2006, 07:28 PM
  3. Exist() Help please.
    By Keith Hubert in forum Alpha Five Version 5
    Replies: 3
    Last Post: 07-20-2003, 05:44 AM
  4. Bug: EXIST
    By Blake in forum Alpha Five Version 5
    Replies: 4
    Last Post: 02-14-2003, 05:35 PM
  5. Using EXIST.
    By Jamin Dunivan in forum Alpha Five Version 4
    Replies: 8
    Last Post: 06-08-2000, 04:01 AM

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
  •