Hi
I'm using Visual Foxpro 8.0. FORM NAME "UpDateInv"
I have a FORM that has labels & textboxes with one COMMAND
button & one CANCEL button. This is for updating a .dbf
file, so each time the USER is finished updating one record they can search for a NEW RECORD(USING THE COMMAND BUTTON) and edit the textboxes. This is a form and not a formset. I wrote the following code in COMMAND button:
In the COMMAND button "click event" CODE:
DO FORM UpdateInv ??opens up the SAME FORM again!
In the COMMAND button "lost focus event" CODE:
Thisform.Release ?? closes out previous, but SAME FORM
If I cancel out the "Lost Focus" code then Foxpro keeps the
form and just creats another of the same form again & again. So if the USER updates 50 records I have 50 forms
to cancel out !!!
If I keep the "Lost Focus" code "thisform.release", I
get a message, "FILE IS IN USE" from FOXPRO the first time
only. Then I can continously use this same FORM over and
over again. I know this is not the correct way to go.
Any suggestions? Can I just REFRESH all Textboxes and
Labels? I want the USER to just click the COMMAND button
to refresh all textboxes & labels and search for a new
stock number or should I create a formset for this form?
Regards
Greg
I'm using Visual Foxpro 8.0. FORM NAME "UpDateInv"
I have a FORM that has labels & textboxes with one COMMAND
button & one CANCEL button. This is for updating a .dbf
file, so each time the USER is finished updating one record they can search for a NEW RECORD(USING THE COMMAND BUTTON) and edit the textboxes. This is a form and not a formset. I wrote the following code in COMMAND button:
In the COMMAND button "click event" CODE:
DO FORM UpdateInv ??opens up the SAME FORM again!
In the COMMAND button "lost focus event" CODE:
Thisform.Release ?? closes out previous, but SAME FORM
If I cancel out the "Lost Focus" code then Foxpro keeps the
form and just creats another of the same form again & again. So if the USER updates 50 records I have 50 forms
to cancel out !!!
If I keep the "Lost Focus" code "thisform.release", I
get a message, "FILE IS IN USE" from FOXPRO the first time
only. Then I can continously use this same FORM over and
over again. I know this is not the correct way to go.
Any suggestions? Can I just REFRESH all Textboxes and
Labels? I want the USER to just click the COMMAND button
to refresh all textboxes & labels and search for a new
stock number or should I create a formset for this form?
Regards
Greg