Solved

Best way to write checking textbox

Posted on 2014-09-08
5
94 Views
Last Modified: 2014-09-08
Which is the best way ?
If txtInfo(0) = "" Or Len(txtInfo(0)) < 3 Or mbIsDirty Then
If txtInfo(0) = vbNullString Or Len(txtInfo(0)) < 3 Or mbIsDirty Then
0
Comment
Question by:isnoend2001
  • 3
  • 2
5 Comments
 
LVL 46

Accepted Solution

by:
Martin Liss earned 500 total points
ID: 40310194
I would do

If Trim(txtInfo(0)) = "" Or Len(Trim(txtInfo(0))) < 3 Or mbIsDirty Then

Also you might be interested in my article on Using Enums.
0
 

Author Closing Comment

by:isnoend2001
ID: 40310210
Thank you
0
 
LVL 46

Expert Comment

by:Martin Liss
ID: 40310248
You're welcome and I'm glad I was able to help.

In my profile you'll find links to some other articles I've written (some of them newly updated) that may interest you.
Marty - MVP 2009 to 2014
0
 

Author Comment

by:isnoend2001
ID: 40310287
I plan on using your Using Enums. in the link i sent
0
 

Author Comment

by:isnoend2001
ID: 40310289
I meant you sent
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now