I use a MaskEdit for the user to input date and the format is (DD/MM/YYYY), but the MaskEdit.text affected by the computer's default date format
(i.e. if the system date format is (MM/DD/YYYY).
I tried the following, but it doesn't work:
Dim StrFrom as String
StrFrom=format(maskedit.text,"DD/MMM/YYYY")      'e.g. 01/09/2000
data1.recordsource="select * from table where fromdate = #" & strfrom & "# "   (the StrFrom will then be "09/Jan/2000")

** I also tried the data type of StrFrom as Date, but it doesn't
Thanks!


創作者介紹
創作者 小吳 VBQA 程式設計討論 的頭像
vbqa

小吳 VBQA 程式設計討論

vbqa 發表在 痞客邦 留言(1) 人氣( 35 )