Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
A Generalised code to check whether mandatory cont...
Author:
Sudhakar Paramanandhem
E-mail:
Click to e-mail author
Submitted:
9/16/2002
Version:
VB4
Compatibility:
VB4, VB5, VB6
Category:
Forms
Views:
9738
A Generalised code to check whether mandatory controls in a form is not left empty. Tag property of the mandatory contrls in the form needs to be set. Can be effectively used by placing in the standard module. Must See...
Declarations:
'none
Code:
Public Function gfNullCheck(ByVal aoControls As Object, ByVal asHeader As String) As Boolean '************************************************************************************* 'This Function is used to check whether all the manadatory field in the forms are not left empty 'Input : 'Output : 'Author : Sudhakar Paramanandhem '**************************************************************************************** Dim liCount As Integer On Error Resume Next gfNullCheck = True For liCount = aoControls.Count - 1 To 0 Step -1 If Mid(aoControls(liCount).Tag, 1, 2) = "NN" Then If Trim$(aoControls(liCount).Text) = "" Then MsgBox Mid(aoControls(liCount).Tag, 4, Len(aoControls(liCount).Tag)) & " Should not be Empty", vbInformation + vbOKOnly, asHeader gfNullCheck = False aoControls(liCount).SetFocus Exit For End If End If Next liCount End Function
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement