Reputation: 625
I am trying to create a button which does exactly the same work of 'execute query' button in the smart bar.
Below are the steps I tried, but isnt working. Please tell me what am I doing wrong. I am creating a simple form using Oracle XE Express Edition 11g and Oracle Forms 10g.
This is a very simple form that displays employee details (Form).
I created a button 'Display', which when pressed, calls execute_query;
When I clicked display button, it gives:
FRM:40202 : Field must be entered.
Additionally the cursor is blinking in the Employee ID field. The 'Execute Query' button in the 'Smart Bar' works fine.
Could you please show me how to make it work?
Upvotes: 0
Views: 12695
Reputation: 1
write a query EXECUTE_QUERY(NO_VALIDATE); then it will not show an error FRM:40202 : Field must be entered.
Upvotes: 0
Reputation: 625
Ok Guys... Got the fix from a different forum.
Go to the property palette of the field where the cursor is (In my case it is Employee ID) --> Under 'Data' --> 'Required' --> set to 'NO'
The above method will work but a better approach is
in PLSQL Editor (button - When_button_pressed) - enter the below code
GO_BLOCK(NO_VALIDATE);
EXECUTE_QUERY;
Then in property palette --> Mouse Navigatable --> set to 'NO'
Save and run the form... You are good to GO.
Upvotes: 0