troubleshooting Question

Error Checking in Visual Studio, VB.Net

Avatar of glenn22
glenn22 asked on
.NET ProgrammingVisual Basic.NET
7 Comments1 Solution388 ViewsLast Modified:
A bit of a issue here. I have a form in a Visual Studio 2005 project, the form has 90 edit boxes on it. I have a save function which saves all the values in the 90 edit boxes to a database, but before saving i need to ensure that these editboxes are not blank and if they are I need an error message to pop up and the save operation to abort.

Currently I have the following code:
Public Function checkfornulls()
If Form1.editbox1.Text = "" Then
            MessageBox.Show("Screen 1, target 1 is blank! Value must be a number.")
            Return True
            Return False
        End If
End Function

one of these for each of the 90 edit boxes.... now while this works, it's poorly coded and I need to know a better way to do it, some kind of loop or something.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 7 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros