[Solved] Prompted for User Input With Data Source Without User Input

Discuss the database features
Post Reply
pengel200
Posts: 6
Joined: Thu Jul 13, 2023 7:15 pm

[Solved] Prompted for User Input With Data Source Without User Input

Post by pengel200 »

Hi. I have a few forms that are based on queries with a prompt for user input required. A sample of the value in one of the Queries is:
LIKE '%' || :Enter_Portion_Of_Customer_Name || '%'

It works PERFECTLY on the forms that use that query as their data source. The problem is that now all the forms in my database are displaying this prompt every time you open them. In one case, I changed the source of one of the "non-input" forms to a table instead of a query, and it is still prompting for the customer name. I've confirmed that the forms that should not be prompting for the user input are tied to data sources that don't have any prompts in the Criterion row of the standard edit window and in the SQL edit window.

Any ideas what is going on? Could the database be corrupted, or am I missing something?
Last edited by MrProgrammer on Sun Jul 23, 2023 7:44 pm, edited 2 times in total.
Reason: Tagged ✓ [Solved] -- MrProgrammer, forum moderator
Paul - Open Office 4.1.14, Windows 11
UnklDonald418
Volunteer
Posts: 1549
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Prompted for User Input With Data Source Without User Input

Post by UnklDonald418 »

Based on the format of the query in your question I'm assuming you are using an Embedded HSQL database. On a few occasions when I've encountered weird behavior I've used Windows Copy & Paste to made a copy of the .odb file and the copy has worked correctly.
If that fails to help then upload a sample .odb file that exhibits the problem.
How to attach a document here
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
pengel200
Posts: 6
Joined: Thu Jul 13, 2023 7:15 pm

Re: Prompted for User Input With Data Source Without User Input

Post by pengel200 »

Attached is a sample file after trying the Copy/Past of the database file.
The Form called "All Orders Form - Add New" has a query as a datasource which does NOT include the prompt for user input. The next one, "All Orders Form - Table" is using a table as the source, but the prompt fires.

The Forms that are named with a Name Search or Receipt Search are the ones tied to Queries with the prompts. I appreciate any help from anyone willing to take a look. Thanks.
Attachments
Special Orders - Sample.odb
(62.68 KiB) Downloaded 198 times
Paul - Open Office 4.1.14, Windows 11
UnklDonald418
Volunteer
Posts: 1549
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Prompted for User Input With Data Source Without User Input

Post by UnklDonald418 »

It appears that both Form documents that begin with "All Orders" have 2 Forms named MainForm.
Open either one of the Form Documents in the Design/Edit mode and on the Form Design Toolbar select the Form Navigator.
One MainForm has all the controls attached to it while the other has no controls.
Right click on the one with no controls and select Properties to open the Form Properties dialog.
On the Data tab of the Form Properties dialog verify that the Data source is "Query_OpenOrdersNameSearch".
In the Form Navigator right click on that MainForm again and select Delete, so you only have one MainForm with controls attached.
Now switch to Live mode to verify that the parameter dialog no longer pops up. Be sure to save your modified Form.
It is perfectly legal to have more than one MainForm each with it's own data source on a single Form document but in this case it isn't helpful.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
pengel200
Posts: 6
Joined: Thu Jul 13, 2023 7:15 pm

Re: Prompted for User Input With Data Source Without User Input

Post by pengel200 »

You nailed it. Taught me a good lesson...don't copy controls from one form to another without thinking through the unanticipated consequences. That's what apparently happened. I had copied my image control from the form w/ the prompt query, and it carried that data source with it. I guess that data source trumped the form data source. I wasn't aware that in Open Office a control didn't automatically inherit the parent form's data source. I went ahead and deleted the control on both forms, then deleted the empty MainForm in the navigator, and recreated the image control on the form that doesn't require the prompt.

I really appreciate your taking the time to look at this and enlighten me. My journey continues!
Paul - Open Office 4.1.14, Windows 11
Post Reply