hm....i dont think DateSerial will work, i read the detail in the web
DateSerial (2004, 6, 30) 'would return would return '6/30/2004'
but the problem is i dont know how to get the date format from the system,
if the system date format is mm/dd/yy, then DateSerial (2004, 6, 30) is valid
else it is an invalid date, because it will treat 30 as the month.
just like the dateValue function,
dateCurrent=DateValue(txtMonth.text & "/" txtDay.text & "/" & txtYear.text)
if the system date format is mm/dd/yy, the function work fine, if the system date format is dd/mm/yy, then this function will give a wrong date.
Is that a way to detect the system date format (since it might be difficult for me to change all 400 pc in my company to fit the format i want, and i need to get an admin rights), if i can detect the date format, then i can use an if/else to do this job
i m sure thats a way to detect the system date format, since my excel template has no problem on inserting records into access database regardless of the date format, i bet there must be a protocol between the excel and access in order to do that, they never mess up the format of the date.
Thanks.