Error: "OpenDialogSheet statement failed..."

Hello Everyone!

Recently I received the following error message.

Screenshot 2023-05-18 at 2.02.54 PM

This error occurred in a database that I recently overhauled. In particular, the main form now displays a set of panels, as shown below.

When I open this database, and I click the “Item Name:” Text Editor box, then hit command F to perform a search, I get the error message shown earlier. Also, I am unable to make any searches using the Find/Select dialog, in this database, or in any others I might have open. To fix this issue, I quit and restart Pan X.

Interestingly, after restarting Pan X, when I use the data sheet to perform a search using command F to bring up the Find/Select dialog, there is no issue. Also, after I use the data sheet to search, any subsequent searches, whether thought the “Item Name” text editor box, of through the data sheet, work every time.

This issue occurs when the database is shared, and when it is not shared.

Do you have any suggestions on why this error might be occurring?

Thank you!

There is a library database built into Panorama that contains a form named FindSelectDialog. This is the form that you see when you press Command-F. If that form somehow got deleted or renamed, you would see that error message. When you relaunch Panorama, a fresh copy of the library database would be loaded, so that’s why it would start working again.

If I wanted to, I could intentionally cause this problem with this code:

setformoptions "_FindSelectLib","FindSelectDialog","DELETE",""

or this:

setformoptions "_FindSelectLib","FindSelectDialog","NAME","junk"

This could also be done with the View Organizer window.

I assume you are going to tell me you haven’t done any of these things. But as far as I know there is no other possible cause for this problem.

Thank you. Your assumption is correct.

If you see this problem again, here’s how you can get some additional information to help track down the problem. Open the View Organizer window, then check the Include Libraries button. Use the pop-up menu to select _FindSelectLib. It should look like this:

Based on your symptoms, I would assume that there won’t be a FindSelectDialog item listed. What do you actually see?

Thanks. My view is the same as yours above.

Ok, I’m stumped. That error message means that FindSelectDialog isn’t there, yet the View Organizer says it is there. I have no idea.

Thank you for checking it out.

Today I stumbled across the following solution. In my .Initialize procedure, I added the following code.

window “Purchaser”
field «Part Name»
window “Purchaser:Main”

Then I click into the “Item Name” text editor on the “Purchaser:Main” window, hit command F, and it works every time. No error as before.

That is a very surprising solution. Glad it worked out though.