search and redisplay a form [message #85058] |
Tue, 25 May 2004 09:45 |
hudo
Messages: 165 Registered: May 2004
|
Senior Member |
|
|
Hello,
I have a form displaying the table scott.emp
Then there exist two Text Items
Hiredate_start and
Hiredate_end
where you enter the dates (format: dd.mm.yyyy)
and another Button named Go_And_Search.
If I press the Button Go_And_Search,
I'd like to clear the form scott.emp
and display in this form only the records
with a hiredate between Hiredate_start
and Hiredate_end.
If the Go_And_Search Button is pressed a
WHEN-BUTTON-PRESSED Trigger is started,
containing the name of a procedure call_hiredate_search.
In this Procedure I:
GO_BLOCK('EMP');
CLEAR_BLOCK(No_Validate);
...but then ..... I'm helpless
|
|
|
Re: search and redisplay a form [message #85071 is a reply to message #85058] |
Fri, 28 May 2004 23:02 |
Tak Tang
Messages: 142 Registered: May 2004
|
Senior Member |
|
|
Pull up the properties on your 'emp' block. Set the 'WHERE clause' to something like 'hiredate between :CTL.Hiredate_start AND :CTL.Hiredate_end', assuming that your hiredate_start and hiredate_end items are in a block named 'CTL'.
Then in your procedure, keep the two lines you have already, and add a command to execute the query. I think its just 'EXECUTE' or it might be 'EXECUTE_QUERY' - I cant remember off the top of my head.
Hope this helps.
Takmeister
|
|
|