Visual Basic Online Course - How to make sure all TextBoxes on form are not empty

Visual Basic Online Course

 How to check if all TextBoxes on form are Empty or not ?!



- In VB.Net it is easy to check if all textboxes values are empty or not, but in Visual Basic 6.0 it is quite tricky because there is no (String.IsNotNullOrEmpty) in VB 6.0.




- Let say you have VB 6.0 Project with Database of any sort, your VB6.0 Project has many TextBoxes (i.e. 15 TextBoxes), and you're adding 10 textboxes contents into a database table fields, and all of them are required (*), so you can do something like this :


You'd need something more flexible and not too long to write every time, also you'd need something dynamic.

- Or -

I've found this page that solved the problem for me and i thought that it would be helpful to share it .

Here is the link
And you can add this block of code to a sub and use it, or even a function. But this is not gonna help you if you decided to change your logic of adding data to database.

VB6 Popular Posts

Visual Basic Online Course - Excel 2003 Part 1

VB 6.0 Crystal Report With MS-Access 2003 - PassWord Problem

Visual Basic Online Course - Analog Clock in VB6