J
John
Hi
I have a list box on a form whose fifth column has values coming from a
datetime table field formatted as hh:mm..
I am trying to get the value of this fifth column, treat it as an hh:mm time
value, subtract 10 minutes from it and then assign it to a variable. I am
using the below code but I am getting the 'Type Mismatch' error on the line
StartTime = Format(ctl.Column(5, varItm), "hh:mm") - 10. What am I doing
wrong?
Many Thanks
Regards
= Code used ==============
Dim StartTime
Set ctl = frm!MyList
For Each varItm In MyList.ItemsSelected
' Below line gets 'Type Mismatch' error
StartTime = Format(ctl.Column(5, varItm), "hh:mm") - 10
'...
Next
I have a list box on a form whose fifth column has values coming from a
datetime table field formatted as hh:mm..
I am trying to get the value of this fifth column, treat it as an hh:mm time
value, subtract 10 minutes from it and then assign it to a variable. I am
using the below code but I am getting the 'Type Mismatch' error on the line
StartTime = Format(ctl.Column(5, varItm), "hh:mm") - 10. What am I doing
wrong?
Many Thanks
Regards
= Code used ==============
Dim StartTime
Set ctl = frm!MyList
For Each varItm In MyList.ItemsSelected
' Below line gets 'Type Mismatch' error
StartTime = Format(ctl.Column(5, varItm), "hh:mm") - 10
'...
Next