M
mané_uk
Hi,
I have a form in which I capture 2 dates and 2 amounts in text fields.
Once the user click on the "save" button it should pass the value to some
variables but there's an error message coming up when I leave any of the date
fields in blank - error 13: type mismatch. (It's part of the requirements to
accept blank date!!)
If I debug it and hover through my date variables it shows:
"dteInterimDteOrder = 00:00:00". Looks as if it's time but I had declared
them as date.
If I hover through my text field value it seems ok:
txtInterimDteOrder.Value = ""
What am I doing wrong? The code used to declare the variables and
allocate the text fields value into the variables are below.
Dim dteInterimDteOrder As Date
Dim dteFinalDteOrder As Date
Dim strInterimAmtRqst As String
Dim strFinalAmtRqst As String
dteInterimDteOrder = txtInterimDteOrder.Value
strInterimAmtRqst = txtInterimAmtRqst.Value
dteFinalDteOrder = txtFinalDteOrder.Value
strFinalAmtRqst = txtFinalAmtRqst.Value
Many thanks
Mané
ps.: The debug "stops" in the first line "dteInterimDteOrder =
txtInterimDteOrder.Value"
I have a form in which I capture 2 dates and 2 amounts in text fields.
Once the user click on the "save" button it should pass the value to some
variables but there's an error message coming up when I leave any of the date
fields in blank - error 13: type mismatch. (It's part of the requirements to
accept blank date!!)
If I debug it and hover through my date variables it shows:
"dteInterimDteOrder = 00:00:00". Looks as if it's time but I had declared
them as date.
If I hover through my text field value it seems ok:
txtInterimDteOrder.Value = ""
What am I doing wrong? The code used to declare the variables and
allocate the text fields value into the variables are below.
Dim dteInterimDteOrder As Date
Dim dteFinalDteOrder As Date
Dim strInterimAmtRqst As String
Dim strFinalAmtRqst As String
dteInterimDteOrder = txtInterimDteOrder.Value
strInterimAmtRqst = txtInterimAmtRqst.Value
dteFinalDteOrder = txtFinalDteOrder.Value
strFinalAmtRqst = txtFinalAmtRqst.Value
Many thanks
Mané
ps.: The debug "stops" in the first line "dteInterimDteOrder =
txtInterimDteOrder.Value"