psycoperl
Active Member
- Joined
- Oct 23, 2007
- Messages
- 339
- Office Version
- 365
- 2016
- Platform
- Windows
- MacOS
- Web
Hi all, I am getting Run-time error '5': invalid procedure call or argument on the first line of this code...
I have a form that is has txt field where the user inserts the date and time to be processed, by default the value is returned by now().
For example the value in the text box (txtStartDate) is 8/23/2011 11:15:19 AM
I have a form that is has txt field where the user inserts the date and time to be processed, by default the value is returned by now().
For example the value in the text box (txtStartDate) is 8/23/2011 11:15:19 AM
Code:
If (Not IsDate(Me.txtStartDate)) Or (Me.txtStartDate > DateAdd(w, 1, Now())) Then
MsgBox "Start Date NOT VALID DATE, Please Try Again"
writeToLog "[RunBatchLoad] ERROR " & Now()
writeToLog "#RBL# * START DATE ERROR *"
writeToLog "#RBL# * User: " & strUser
writeToLog "#RBL# * Source: " & cmbSource
writeToLog "#RBL# * Catergory: " & cmbCatergory
writeToLog "#RBL# * Activity: " & cmbActivity
writeToLog "#RBL# * Quantity: " & txtQuantity
writeToLog "#RBL# * Start Date/Time: " & txtStartDate
writeToLog "#RBL# * Interval: " & txtIntervalTime & " " & cmbIntervalPeriod
writeToLog "*****************************"
Valid = False
GoTo End_Sub
End If
Last edited: