CodeWidgets.com Online Source Code Library -ASP, ASP.NET, VB, VB.Net,
Microsoft® Access, Javascript, VBScript, Website Design, Web Applications,
Custom Programming Services Available.
|
|
ASP, ASP.NET, VB, VB.Net,
Microsoft® Access, Javascript, VBScript,
Website Design, Web Applications |
|
|
Shopping Cart
(0) Items $0.00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Website Stats to Date
|
|
Pages Viewed 4,401,732
|
|
Visitors
1,206,536
|
|
Widgets Viewed
3,009,755
|
| Since January 1/2003 |
| |
Active Users: 17
|
|
|
|
|
|
 |
|
|
| |
| Widget
#CS0163 |
Date Validation Function (Microsoft® Access,VB.6.0)Date Validation Function (Microsoft® Access,VB.6.0) |
|
|
|
|
|
| Widget Info
|
Date Validation function.
To use with Microsoft® Access, in the After_Update or Before_Update event of a TextBox enter.
=ValidateDate(!TextBoxName)
Public Function ValidateDate(ByVal thisDate As Variant) As Boolean
On Error GoTo errTrap
'Set the default return value to True
ValidateDate = True
'Check that a valid date was entered
If IsDate(thisDate) = False Then
MsgBox "Please enter a valid date!", vbOKOnly
ValidateDate = False
Exit Function
End If
'Check that the date entered is greater than today
If CDate(thisDate) <= Date Then
'MsgBox "Please enter a date greater than today!", vbOKOnly
ValidateDate = False
End If
'Check that the date entered is not out of range, entered incorrectly or too far into the future
If CDate(thisDate) > #1/1/2010# Then
MsgBox "Please check the date entered!", vbOKOnly, "Date Out Of Range"
ValidateDate = False
End If
'Enter other validation rules here.....
''''IE: disallow weekends
If Weekday(CDate(thisDate)) = 7 Or Weekday(CDate(thisDate)) = 1 Then
MsgBox "Weekends Not Premitted", vbOKOnly
ValidateDate = False
End If
Exit Function
errTrap:
MsgBox Err.Number & Err.Description
End Function |
|
| Licensing |
| Format:
HTML Article |
| Online Document |
| Licencing Terms:
Developer Re-Use: Programming Experience Required |
Project Development Use Only. Re-Distribution Permitted only as part of a compiled Application. This source code is provided to you "as is" without warranty.
CLICK HERE FOR TERMS OF USE
Copyright 2002-2006 Comrie Software Solutions |
|
| Related Widgets |
|
|
| ShoppingCart Empty |
|
|
|
| Featured Widgets |
| WebStore |
| Online Store Application
Template (ASP.NET) |
| More... |
|
| ShoppingCart |
| WebUserControl (ASP.NET) |
| More... |
|
| Calendar Reports |
| (Monthly View) |
| For Microsoft® Access |
| More... |
|
Online Voting/Survey
Web-App |
 |
|
More... |
|
|
|
|
|
 .. this is one site that believes in Customer Service. I had questions, I had answers quickly. No "wait for days", No "buy this and
find out". Just courteous and HELPFUL answers.
It is refreshing to find a site that really cares about their products and
stands behind them!
And their products perform as they promote them. John L. |
 When I received my ASP.NET E-Commerce application it was for the purpose of marketing my software inventory via the internet. It took a minimal amount of time to launch it and offers host of traffic tracking options for further market study and analysis. Overall an excellent product.
Richard G.
|
|
|
|
|
|
|
|
|