Form titles reset unexpectedly

If form names are changed using the “title” parameter in openform, the form names reset to their default names when the file is saved. This is also true of clones, with which maintaining differing titles while open is a particularly useful feature.

The title parameter of the openform statement doesn’t change the name of the form, it changes the name of the window. The behavior you are describing is exactly how it is supposed to work. You can also change the window title after the window is open by using the windowname function. This statements allows you to change the window at any time.

For example, suppose you have a database named Contacts with a form named Entry. Usually when this form is opened the window name would be Contacts:Entry. But using th title option of the openform statement you could use any name you want, for example Person or Contact. There doesn’t have to be a colon, and the window name can be completely different from both the database name and the form name.

In Panormaa 6 you could do this with two statements, like this:

openform "Entry"
windowname "Person"

But now you can do it all at once:

openform "Entry","title","Person"

In addition to being less code, this also eliminates a little “flash” as the name changes. With this option the window will open with the name you want, no flash.

If you do want to rename a form via code, you need to use the setformoptions statement with the name option. This allows you to permanently change the name of a form.

Good point. But you are saying that the window name reverting to the form name if the file is saved while the window is open, is how it’s expected to work?

I’ve noticed the window name “reverting” for years, but I never put it together that saving the file was what was causing that. With that clue I was able to track down why it was happening and fix it. Thank you for the clue!