Home » Developer & Programmer » Forms » Show all records
Show all records [message #111855] Mon, 21 March 2005 06:31 Go to next message
rzkhan
Messages: 370
Registered: March 2005
Senior Member
Dear All... I have two blocks. 1. emp (data block) 2. cbk (control block).

I have put a list item on cbk. and attached the following code with when-list-changed trigger.
-----------------
go_block('emp');
set_block_property('emp',default_where,'deptno = :cbk.abc ');
execute_query;
-----------------
It all works fine.
But the problem is how can I show ALL RECORDS on the emp block without closing the form. I have used another push button with the following code but it seems useless.
--------------
go_block('emp');
clear_block;
execute_query;
-------------
I m waiting ...Thanks for listening..
Khan
Re: Show all records [message #111867 is a reply to message #111855] Mon, 21 March 2005 07:20 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Look at what you coded:
1. Set the default where to 'deptno=...'

2. Execute the query

Afterwards:
1. Clear my block.
2. Execute the query (the default where is still 'detpno=...')

Where do you reset the default where?

MHE

PS: I'm also waiting...Wink
Re: Show all records [message #111930 is a reply to message #111867] Mon, 21 March 2005 22:29 Go to previous messageGo to next message
rzkhan
Messages: 370
Registered: March 2005
Senior Member
Dear Sir,
This is the problem. could u be kind enough to let me know how can I reseset the default where??
thanks
Khan
Re: Show all records [message #112125 is a reply to message #111930] Wed, 23 March 2005 02:51 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
rzkhan wrote on Tue, 22 March 2005 05:29

But the problem is how can I show ALL RECORDS on the emp block without closing the form. I have used another push button with the following code but it seems useless.
Use this button, and code something like you did in the other button:
go_block('emp');

-- one of the two statements below:
set_block_property('emp',default_where,null);
set_block_property('emp',default_where,'1=1');


execute_query;
I don't know whether Forms accepts a NULL as default where, so I left in an alternative.

MHE
Previous Topic: Alert overshadowing Display
Next Topic: Help with LOV query
Goto Forum:
  


Current Time: Thu Sep 19 18:58:52 CDT 2024