Current area: HOME ->

Zip File view

Validating dates in Visual Basic


This page allows you to view the contents of a file contained inside a ZIP archive available at Programmer's Heaven. This means you can view the code and find what you need from it without having to download the ZIP file first. If the file contains source code for a language we recognize, we have syntax highlighted it.

Filename displayed: FORM1.FRM
Found in file: VALDAT.ZIP

Download: Utillity Pack v1.0 Tons Of UseFull Stuff..! All Sources Included! (C/Asm)   (Scrolling, Compression, Conversion, renaming files...)
VERSION 2.00
Begin Form Form1
   Caption         =   "Invoice edit"
   ClientHeight    =   2355
   ClientLeft      =   2580
   ClientTop       =   2025
   ClientWidth     =   6240
   Height          =   2760
   Left            =   2520
   LinkTopic       =   "Form1"
   ScaleHeight     =   2355
   ScaleWidth      =   6240
   Top             =   1680
   Width           =   6360
   Begin CommandButton Command3
      Caption         =   "E&xit"
      Height          =   375
      Index           =   2
      Left            =   4800
      TabIndex        =   8
      Top             =   1680
      Width           =   1215
   End
   Begin TextBox Text3
      DataSource      =   "Data1"
      Height          =   375
      Left            =   1800
      TabIndex        =   6
      Top             =   1080
      Width           =   2535
   End
   Begin CommandButton Command3
      Caption         =   "&Delete"
      Height          =   375
      Index           =   1
      Left            =   4800
      TabIndex        =   5
      Top             =   600
      Width           =   1215
   End
   Begin CommandButton Command3
      Caption         =   "&Add"
      Height          =   375
      Index           =   0
      Left            =   4800
      TabIndex        =   4
      Top             =   120
      Width           =   1215
   End
   Begin TextBox Text2
      DataSource      =   "Data1"
      Height          =   375
      Left            =   1800
      TabIndex        =   1
      Top             =   600
      Width           =   2535
   End
   Begin TextBox Text1
      DataSource      =   "Data1"
      Height          =   375
      Left            =   1800
      TabIndex        =   0
      Top             =   120
      Width           =   2535
   End
   Begin Data Data1
      Caption         =   "Browse invoices"
      Connect         =   ""
      DatabaseName    =   "C:\TMP\VDATE\VALDATE.MDB"
      Exclusive       =   0   'False
      Height          =   270
      Left            =   1320
      Options         =   0
      ReadOnly        =   0   'False
      RecordSource    =   "Invoices"
      Top             =   1800
      Width           =   3015
   End
   Begin Label Label1
      Alignment       =   1  'Right Justify
      Caption         =   "Customer ID:"
      Height          =   255
      Index           =   1
      Left            =   120
      TabIndex        =   7
      Top             =   1080
      Width           =   1575
   End
   Begin Label Label2
      Alignment       =   1  'Right Justify
      Caption         =   "Ship date:"
      Height          =   255
      Left            =   120
      TabIndex        =   3
      Top             =   600
      Width           =   1575
   End
   Begin Label Label1
      Alignment       =   1  'Right Justify
      Caption         =   "Invoice number:"
      Height          =   255
      Index           =   0
      Left            =   120
      TabIndex        =   2
      Top             =   120
      Width           =   1575
   End
End
Option Explicit

Sub Command3_Click (Index As Integer)
   
    Select Case Index
    Case 0
       
        Data1.Recordset.AddNew
   
    Case 1
       
        Data1.Recordset.Delete
   
    Case 2
       
        End
   
    End Select

End Sub

Sub Text2_LostFocus ()
   
    Dim fIsDateValid As Integer
    Dim vInputDate As Variant
    Dim dynDataSetToTest As Dynaset
    Dim zFieldName As String

    vInputDate = Text2.Text
   
    ' This technique assumes the input control box is bound
    ' to a database via a data control.
   
    ' the next line copies a data control record set into a dynaset
    Set dynDataSetToTest = Data1.Recordset
   
    zFieldName = Text2.DataField
    Const fSayWhyItFailed = True
   
    fIsDateValid = ffnValidTimeDate(vInputDate, dynDataSetToTest, zFieldName, fSayWhyItFailed)
   
    Set dynDataSetToTest = Nothing
   
    If fIsDateValid = False Then
        ' Go back to the field to get new date
        Text2.SetFocus
    Else
        ' Nothing to do!
    End If

End Sub


Number Base Converter Version 2.05
This software provides Visual BASIC functions for converting numbers between numeric bases, supporting bases 2 to 36. It also includes a function for rounding numbers stored in a base to a number ...
A birthday card ASM source (nice dots)

Utillity Pack v1.0
Tons Of UseFull Stuff..! All Sources Included! (C/Asm) (Scrolling, Compression, Conversion, renaming files...)
Download Number Base Converter Version 2.05 This software provides Visual BASIC functions for converting numbers between numeric bases, supporting bases 2 to 36. It also includes a function for rounding numbers stored in a base to a number ... Download A birthday card ASM source (nice dots) Download Utillity Pack v1.0 Tons Of UseFull Stuff..! All Sources Included! (C/Asm)   (Scrolling, Compression, Conversion, renaming files...)







Sponsored links

Build IT Knowledge with Current & Trusted Content
Helps Employees Develop & Hone New Technical Programming Skills. Sign Up & Get Full Access.
Check Out IT Certification Preparation Materials
Sign Up With SkillSoft & Get Access to Training Materials for Over 50 Professional Certifications.
Localize software in three simple steps
Localize .Net, C/C++ & Delphi apps visually. HTML, HTML Help, XML & databases. Try Sisulizer now!
Localize Delphi software in three simple steps
Localize Delphi VCL & .Net apps visually. Plus HTML, HTML Help, XML & databases. Try Sisulizer now!
Web based bug tracking - AdminiTrack.com
AdminiTrack offers an effective web-based bug tracking system designed for professional software development teams.


Newsletter | Submit Content | About | Advertising | Awards | Contact Us | Link to us |
© 1996-2008 Community Networks Ltd All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Synchron Data - .NET development.