Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error in custom method: Nested proceedures.
Message
From
27/12/1999 10:21:32
 
 
To
27/12/1999 09:35:44
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00308745
Message ID:
00308763
Views:
14
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform