Hi,
I just created a new Post cause i think the subject is different, hope you can point me as you always do.
I did this in VFP 5.0
I am having a little issues with the grid displaying the data i want, actually when i typed in my main form text search box and click on the search button this will open another form with a grid to display all the records that match whatever i typed in the textbox and until this point everything is ok but once i select on that record or row with a mouse click to Edit on that grid then it fills up the grid with more records(the pointer does not move from that record wich is fine) that are similar of the one i typed but not exactly the same but the begining characters of the records displayed are close to the one i found, and that makes sense cause the table is ordered by Vendpartno and some of them are similar but not exactly the same and i don't need them to be displayed, what it does not make sense why will display more than the records i asked for and why not just simply the records that just matched exactly the Vendpartno as the one i just inputed into the textbox, i will insert here some code and the properties, any suggestions will be very appreciated to resolve this problem.
In My startup prg file i have "SET MULTILOCK ON" and this form is called via a menu mpr
A form named fvpart_2.scx
in the form activate event i have
thisForm.txtinput.Setfocus() && this where i will type the Vendpartno
thisForm.refresh
in the data environment, i have a free table named potran04.dbf
datasesion = default datasession
in the form load event i have
PUBLIC p_art_2, emp_ty
the textbox property controlsource = p_art_2
the " " " " Gotfocus the code is as below
p_art_2=""
emp_ty=.f.
in the textbox property interactiveChange
PUBLIC nLenp_art_2
IF NOT EMPTY(THIS.VALUE)
emp_ty=.f.
p_art_2 = ALLTRIM(thisform.txtinput.value)
nLenp_art_2= len(ALLTRIM(p_art_2)) && to know how long is the string new 03/08/2013
ENDIF
textbox property LostFocus
if empty(this.value)
emp_ty=.t.
wait window [You need to enter a Part No to search, TRY AGAIN] NOWAIT
thisform.txtinput.value=""
THISFORM.REFRESH
endif
I just created a new Post cause i think the subject is different, hope you can point me as you always do.
I did this in VFP 5.0
I am having a little issues with the grid displaying the data i want, actually when i typed in my main form text search box and click on the search button this will open another form with a grid to display all the records that match whatever i typed in the textbox and until this point everything is ok but once i select on that record or row with a mouse click to Edit on that grid then it fills up the grid with more records(the pointer does not move from that record wich is fine) that are similar of the one i typed but not exactly the same but the begining characters of the records displayed are close to the one i found, and that makes sense cause the table is ordered by Vendpartno and some of them are similar but not exactly the same and i don't need them to be displayed, what it does not make sense why will display more than the records i asked for and why not just simply the records that just matched exactly the Vendpartno as the one i just inputed into the textbox, i will insert here some code and the properties, any suggestions will be very appreciated to resolve this problem.
In My startup prg file i have "SET MULTILOCK ON" and this form is called via a menu mpr
A form named fvpart_2.scx
in the form activate event i have
thisForm.txtinput.Setfocus() && this where i will type the Vendpartno
thisForm.refresh
in the data environment, i have a free table named potran04.dbf
datasesion = default datasession
in the form load event i have
PUBLIC p_art_2, emp_ty
the textbox property controlsource = p_art_2
the " " " " Gotfocus the code is as below
p_art_2=""
emp_ty=.f.
in the textbox property interactiveChange
PUBLIC nLenp_art_2
IF NOT EMPTY(THIS.VALUE)
emp_ty=.f.
p_art_2 = ALLTRIM(thisform.txtinput.value)
nLenp_art_2= len(ALLTRIM(p_art_2)) && to know how long is the string new 03/08/2013
ENDIF
textbox property LostFocus
if empty(this.value)
emp_ty=.t.
wait window [You need to enter a Part No to search, TRY AGAIN] NOWAIT
thisform.txtinput.value=""
THISFORM.REFRESH
endif