Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Text Box
Message
From
06/05/2006 15:46:00
 
 
To
06/05/2006 05:43:38
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Environment versions
Visual FoxPro:
VFP 7
OS:
Windows XP
Network:
Novell 4.x
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01119855
Message ID:
01119888
Views:
15
IF NOT EMPTY(This.Value)
   micode = This.Value
   valmicode = IsBlack(micode)
   IF ! valmicode
      SELECT products
      SET ORDER TO icode
      SEEK micode
      IF FOUND()
          .... displays values
      ELSE
         scat memv blank
      ENDIF
   ELSE
      nanswer= messagebox("Do you wish to exit ?",4+32+256, "Your Selection",0)
      DO CASE
         CASE nanswer = 6
            ThisForm.Release
         OTHERWISE
            This.SetFocus
            Nodefault
      ENDCASE
   ENDIF
ENDIF
You may need to do some extra validation when you close the screen or save the record based on having an empty value in this field.

>Hi All
>
>I created a product entry form on which I have one text box (micode). In lost focus event of the said box I type the following codes:
>
>micode = This.Value
>valmicode = IsBlack(micode)
>if ! valmicode
>select products
>set orde to icode
>seek micode
>if foun()
>.... displays values
>else
>scat memv blank
>endif
>else
>nanswer= messagebox("Do you wish to exit ?",4+32+256, "Your ;
>Selection",0)
>do case
>case nanswer = 6
>ThisForm.Release
>other
>This.SetFocus
>Nodefault
>endcase
>endif
>
>Now, the question is, if I click on find button (if I want to find a specific record relating to this ) in commandgroup button (cmdFind) it checks the routine in lostFocus of the text box which is ofcourse blank and therefore it displays the message "Do you wish to exit ?". It really irritating, how can I overcome this ? Is there any idea for the better solution.
>
>Please help !
>
>Saify
Previous
Reply
Map
View

Click here to load this message in the networking platform