Full Version: Access 2007 and SQL 2008 Date display problem
UtterAccess Forums > Microsoft® Access > Access Forms
alainB
Look like I need some serious help here, how can I display date in an access 2007 form or datagrid in the US format mm/dd/yyyy.
The dates being pulled from SQL is yyyy-mm-dd and it is not acceptable for our client. All my date fields are updatable, so on my forms I have the mm/dd/yyyy as a mask.
The datatype on the SQL tables are Date, (tries other date format but the end result is the same yyyy-mm-dd)
tought I found the solution by adding a convert function to my view, the data being displayed is right but when it is time to update, I get an error about ODBC cannot uptade table or view because it contain a derived or constant field. So back to square 1. Any help on this matter will be greatfull before I pull every single hair on my head (not that many left....).
Oalso need to mention that I am using bound controls on my form and working thru an ODBC connection
multicoat
Hello
What about using unbound field to display and edit the date information?
Me.DummyField = Format(Me.DateField,"mm/dd/yyyy")
then to change the record use the DummyField AfterUpdate event
Me.DateField = Format(Me.DummyField, "yyyy-mm-dd")
jwhite
If I interpret your post correctly, you are talking about the end-result value that you see in the SQL table (see attached)? If so, that is how SQL displays the value at table level. When users need to see data, you present the data in a user interface in the format users want to see - use the Format Property, perhaps Short Date.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.