Dear Access experts,
Can you help me out with subject error?
I'm trying to display the date and time entry in the textbox DeliveryDate on my form frmVessels without the seconds, but keep getting #Name? and #Type? errors. I'm spuzzled...
Made following module:
Set in the form frmVessels the control source of the textbox DeliveryDate to:=MySpecialDateFormat([DeliveryDate])
Form frmVessels based on TblVessels
TblVessels: ShipIDPK, DeliveryDate (Data Type Date/Time General Date)
Thanks.
Can you help me out with subject error?
I'm trying to display the date and time entry in the textbox DeliveryDate on my form frmVessels without the seconds, but keep getting #Name? and #Type? errors. I'm spuzzled...

Made following module:
Code:
Public Function MySpecialDateFormat(ByVal d As Date) As String
MySpecialDateFormat = Format(d, "mm\dd\yyyy")
If Hour(d) = 0 Or Minute(d) = 0 Then _
MySpecialDateFormat = MySpecialDateFormat & _
Format(d, " hh:nn ")
End Function
Set in the form frmVessels the control source of the textbox DeliveryDate to:=MySpecialDateFormat([DeliveryDate])
Form frmVessels based on TblVessels
TblVessels: ShipIDPK, DeliveryDate (Data Type Date/Time General Date)
Thanks.