Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wierd behaviour
Message
De
08/05/2006 03:42:10
 
 
À
08/05/2006 03:36:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01119971
Message ID:
01119973
Vues:
16
>Hi please help,
>I tried this but I got a wird result:
>
>USE install ALIAS install
>scan
>IF RECNO(install.insta)> 100
>
>MESSAGEBOX("You have not been registered yet!",0+16,"Sorry! Attention.")
>
>!/n registrasi.exe
>
>CLOSE all
>QUIT
>
>ELSE
>
>DO correct.prg
>endif
>endscan
>
>
>I put that in a cmdbutton to call a menu shortcut named correct.prg
>Using select command causes no effect.
>
>the wierd result is that the first click on the menu, generates no messagebox of no entrance and instead it called a form as it should. while on the secon click in the same menu, it both called a form and generated my msgbox of no entrance. In fact, which is the proper way to know that a record has reached, let's say, 100. If it has reached that amount, then the no entrance msgbox appears. and why on the second click on the same menu it executed both commands? calling a form and a msgbox of no entrance. Thank you.
>
>regards
>
>
>Syah Nurrohman

RecoNo wants ALIAS:
USE Install
scan
   IF RECNO([Install])> 100
      MESSAGEBOX("You have not been registered yet!",0+16,"Sorry! Attention.")
      !/n registrasi.exe
      CLOSE all
      QUIT
   ELSE
      DO correct.prg
   endif
endscan
Better:
USE Install
COUNT TO nRec FOR NOT DELETED()
*** If you didn't allow to user to delete records of that table
*** you can use RecCount([Install]) instead of COUNT TO ...
IF nRec > 100
   MESSAGEBOX("You have not been registered yet!",0+16,"Sorry! Attention.")
   !/n registrasi.exe
   CLOSE all
   QUIT
ELSE
   DO correct.prg
endif
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform