to make a fucnation return mutliple values
Posted on 2004-09-20
i have got a problem. iam having forms which has 70 controls like txtbx,combo,etc..while saving data i have to write validation code for all the controls which is tiresome..
so i decided to a function in which i loop through each and every control and if i found empty i will genrate a msg that a box is empty.. the function i working
public function empty(frm as form)as boolean
dim ctrl as control
for each ctrl in frm
if type of ctrl is text box and ctrl.text="" then
msgbox" txt box empty"
but the problem is iam having so much controls i want the focus to set the control to help the end user
after genrating the msg. so i want to return control name or some method by which i can set focus to it
so please help me out. iam counting alot on your expertness than you you do on yours