Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validate multiple editbox for empty

Status
Not open for further replies.

lloydie2

Programmer
Apr 21, 2003
75
GB
Simple one for someone. How do I check multiple editboxes to see if the are empty

----------------
if editbox1.text or editbox2.text or editbox3.text
then begin
showmessage('please fill in required fields');
end;
else
begin
//do something
end;
 
Managed to sus it
if (editbox1.text ='') or (editbox2.text ='') or (editbox3.text ='')
 
Are you using this code in an event handler? If so which one?

Clive [infinity]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer."
Paul Ehrlich
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top