Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Verification....
Message
De
04/01/2001 14:39:46
 
 
À
04/01/2001 13:50:50
N. Lea
Nic Cross Enterprises
Valencia, Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00459464
Message ID:
00459484
Vues:
16
>I have this pageframe from which has seven pages to it. One each of these pages is on grid filled with different ranges of data. Some grids have 14 fields while others have only one. When everything is all filled out and all is said and done, the end user is going to head to the last page and find a submittal button. When this button is click, I want to have a method that has Foxpro verify that all fields have been inputed with data (i.e. no blank fields). The source of all the grids are cursors. Any suggestions would be very helpful!! Thank you!!

You don't need to go to the grids for this - go to the cursors, instead.
I recommend checking all required fields and then giving an error message/report, rather than stopping at the first empty required field. e.g., let's say you have 2 cursors, Company and Employee. Company name is required, Employee first name and last name are required. Company would have one record, Employee would have multiple.
Local lcErrorMsg, llRetVal
lcErrorMsg = ""
*-- verify company name populated
Select company
If Empty(cname)
  lcErrorMsg = lcErrorMsg + Chr(13) + "Company Name is required."
EndIf

*-- verify Employee last name and first name populated
Select people
Locate For Empty(clastname) Or Empty(cfirstname)
If Found()
  lcErrorMsg = lcErrorMsg + Chr(13) + "Employee First and Last Name are required."
EndIf

If !Empty(lcErrorMsg)
  lcErrorMsg = Substr(lcErrorMsg,2) && trim off first Chr(13)
  MessageBox(lcErrorMsg, 48, "Application")
  llRetVal = .F.
Else
  llRetVal = .T.
EndIf

Return llRetVal
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform