for VB6

Code:
************
Public function cHecker(frm as form)as Boolean
  dim obj as string
  For each obj in frm
    If typeof obj is textbox then
      If obj.text="" then
         checker=false
         msgbox "Textbox is empty"
         exit function
      End if
    End if
  Next obj
End Function

***********syntax
if checker=
...