I need a date validation procedure. If someone can direct me to an example, that would be most nice. I am using VB 6.0 with a SQL Server 7.0 DB.
I have 2 dates on my user form: Open Date and Close Date. Within the DB table, they are defined as datetime. I am using a masked edit box to accept input in the format of dd-mmm-yyyy (can't use the date picker for various reasons). The Open Date must always be entered and the Close Date will only be entered when the ticket is closed out. The editing that should occur prior to writing the rec to the DB is:
Is Open Date a valid Date?
Is Close Date a valid Date or empty?
If Close Date is entered, is it greater than or equal to the Open Date?
When I write to the SQL DB table, if Close Date is not entered, I would like to see NULL in the table column.
Hope someone can be of help.
Michael A. Martin
I have 2 dates on my user form: Open Date and Close Date. Within the DB table, they are defined as datetime. I am using a masked edit box to accept input in the format of dd-mmm-yyyy (can't use the date picker for various reasons). The Open Date must always be entered and the Close Date will only be entered when the ticket is closed out. The editing that should occur prior to writing the rec to the DB is:
Is Open Date a valid Date?
Is Close Date a valid Date or empty?
If Close Date is entered, is it greater than or equal to the Open Date?
When I write to the SQL DB table, if Close Date is not entered, I would like to see NULL in the table column.
Hope someone can be of help.
Michael A. Martin