close button

rups1

New member
Local time
Yesterday, 17:11
Joined
Apr 20, 2006
Messages
7
i have close button on my form made thru the command button. But it does not show an error message when the form closes if information has not been entered in the reqired fields. it does not save the field though. how can i get the error messages to be shown before the form closes asking the suer to enter the missing data. thanks
 
In the on click event of the button you can validate your fields
eg

if nz([fieldname],"") ="" then
msgbox "Please supply a value",vbinformation,"Invalid entry"
fieldname.setfocus
exit sub
end if

Just repeat for each field (the above checks to see if the field has a value)
 

Users who are viewing this thread

Back
Top Bottom