Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Querying
Message
From
17/10/2005 14:49:02
 
 
To
17/10/2005 14:25:48
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01059617
Message ID:
01059676
Views:
15
Then it seems that either:

m.Type_P = "PS" && read from combobox
m.Number = "0001" && read from combobox

* if you have a compound index tag on Type_P + Number
If Seek(m.Type_P + m.Number)
* found
Else
* not found
Endif
or for example if you have separate index tags,
this is also Rushmore optimizable:

Select * from Proyect ;
where Type_P = m.Type_P ;
and Number = m.Number ;
Into cursor ResultSet
would do the trick.

HTH

Exactly... at first I was summing strings but I found it extremely difficult to "locate" because if the user entered spaces, it would count as characthers and the search would not be exact, because of the differences in the strings... it was impossible for me to find a match...

I think the select function will be more helpful I will try it and let you know... thank you., but, into cursor...? Im not using a grid, I want to present all information from that proyect in the textboxes in the form... for example...
when I have the proyect matched... I want all original data from that proyect to be displayed in the form... store proyect.employee to thisform.employee.value
or... store proyect.employee to m.employee
you get it?

I had something like this...

store alltrim(thisform.combo1.value + thisform.text1.value) to thisform.search.value
select proyect
locate for proyect.numero = m.search;

if found()

store proyect.number to thisform.number.value
store proyect.descripcion to thisform.descripcion.value
store proyect.resumen to thisform.resumen.value
store proyect.resumen2 to thisform.resumen2.value
thisform.command6.enabled=.t.
thisform.command2.enabled=.t.
thisform.command4.enabled=.t.
thisform.command7.enabled=.t.
thisform.search.value = ""
else

thisform.search.setfocus
thisform.search.SelStart = 0
thisform.search.SelLength = 255
*!* thisform.buscar.selectonentry=.t.
thisform.command2.enabled=.f.
thisform.command6.enabled=.f.
thisform.command4.enabled=.f.
thisform.command7.enabled=.f.
thisform.number.value=""
thisform.descripcion.value=""
thisform.resumen.value=""
thisform.resumen2.value=""
Title = 'Search of Proyect'
lcmessage = "Could not find any proyect"
if MESSAGEBOX(lcmessage,16,Title) = 1
thisform.añadir.enabled=.t.
thisform.command2.enabled=.f.
thisform.command6.enabled=.f.
thisform.command4.enabled=.f.
thisform.command7.enabled=.f.
*!* thisform.search.selectonentry=.t.
=tablerevert(.t.)
endif
endif

thaanks again!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform