Ha ragione Steno!!!
if trim(text1.text) = "" and trim(text2.text) = "" then
msgbox ("Dati mancanti")
end if

Cosi controlli se la text è vuota e non con <>
Ciao
Jefferson