Home » Developer & Programmer » Forms » Finding a Particular Record in a form
Finding a Particular Record in a form [message #138268] Wed, 21 September 2005 01:41 Go to next message
sarfraz_attari
Messages: 123
Registered: July 2005
Senior Member
hi

I have a form having around 1000 record displayed i want to search a particular record in the form by putting a condition how can i do it
pl advice

thanks

sarfraz
Re: Finding a Particular Record in a form [message #138326 is a reply to message #138268] Wed, 21 September 2005 06:11 Go to previous messageGo to next message
sirish604
Messages: 4
Registered: June 2005
Junior Member
Hii
I think it can be done like this.
Take a text box which is not attached to any canvas.
Now put ur condition in this text box and try to run the query by appending the earlier condition.
I will try to send the source code for this very soon.
Thanks,
Sirish.
Re: Finding a Particular Record in a form [message #138327 is a reply to message #138326] Wed, 21 September 2005 06:22 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
@sirish604: http://www.vtm.be/auto/forum/images/smilies/old/icon_eek.gif Why build something that already exists?

Option 1:
Go to enter-query mode. Now you can enter values in any database item (you can even use wildcards and < or >) to compare that item with. Normally Forms will take your criteria in it's where clause when you execute the query.

Option 2:
Go to enter-query mode and Put a '&' in any database item. When you execute, a query-where box will pop up and you can enter criteria.

MHE

[Updated on: Wed, 21 September 2005 06:23]

Report message to a moderator

Re: Finding a Particular Record in a form [message #138457 is a reply to message #138327] Thu, 22 September 2005 02:11 Go to previous messageGo to next message
sirish604
Messages: 4
Registered: June 2005
Junior Member
Hi,
This is a very simple solution.
I was just thinking something complex.
Great solution!!!!
Thanks,
Sirish.
Re: Finding a Particular Record in a form [message #156876 is a reply to message #138457] Sun, 29 January 2006 04:13 Go to previous message
awan
Messages: 9
Registered: September 2005
Location: Riyadh
Junior Member
hi ,

Well it has many solutions....one of through LOV's..I really like it and i'm using it on my different modules..

1)create one control block. add three text items.e.g,txt_p1,txt_p2 and var

2)create a LOV ...e.g, u wanna search the record through ...select id in query.....and retrun it in var text item..which is in u'r control block.

3)create one push button ..it might be in u'r block or in control block...

source code in button
DECLARE 
	   dummy	 BOOLEAN; 
BEGIN 
			
	dummy := Show_LOV('LOV_name');
        :TXT_P1	:=	'ID';		
	:TXT_P2	:=	:Control_block_name.VAR; 		
  GO_BLOCK('your_block_name'); /*write the name of u'r block where u want search */
  SET_BLOCK_PROPERTY('your_block_name', DEFAULT_WHERE, :TXT_P1||' = :TXT_P2');
 EXECUTE_QUERY; 
END;


It will work really nice


Previous Topic: Activex
Next Topic: help me to make form6i read from com port (rs232)
Goto Forum:
  


Current Time: Fri Sep 20 05:38:12 CDT 2024