Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error in custom method: Nested proceedures.
Message
De
27/12/1999 10:21:32
 
 
À
27/12/1999 09:35:44
John Murray
Health Research, Inc.
Albany, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00308745
Message ID:
00308763
Vues:
15
Hi John,

Try this: in the form designer, click on the Forms>New Method and call it VerifyData. In it, put this (I made your IF checks a CASE statement):
local lcMessage
lcMessage = ''
do case 
	case empty(thisform.txtos.value)
		lcMessage = 'Please enter the currently used operating system.'

	case empty(thisform.txtlanme.value)
		lcMessage = 'Last Name must have a value.'

	case empty(thisform.txtfname.value)
		lcMessage = 'First Name must have a value.'

	case empty(thisform.txtphone.value)
		lcMessage = 'A telephone # must be entered.'

	case empty(thisform.cbosystem.displayvalue)
		lcMessage = 'A system type must be selected.'Error')

	case empty(thisform.txtsysver.value)
		lcMessage = 'Current system version must have a value.'

	case empty(thisform.txtdatesubmitted.value)
		set date to american, long
endcase
if not empty(lcMessage)
	messagebox(lcMessage, 0 + 48, 'Field Error')
endif
return empty(lcMessage)
Also, so of the rules can be set int the database (if this table is apart of the database), select the field you want in the table designer, then fill in the Rule and Message.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform