<br><font size=2 face="sans-serif">Hi all,</font>
<br>
<br><font size=2 face="sans-serif">I am having more date issues in access. I have searched the archives and tried the formatting shown there. I have redone the code several times and implemented msgbox popups but to no avail. I now have less hair and am considering a return to the chain smoking days of my youth... or putting a hit out on Microsoft for the whole America is the world date thing. (I am married to an American so I get to whine about it a lot). </font>
<br>
<br><font size=2 face="sans-serif">this is the scenario.</font>
<br>
<br><font size=2 face="sans-serif">It is a simple little database written a few years back and now passed on to me because it has problems. (I get all the good jobs)</font>
<br>
<br><font size=2 face="sans-serif">It has a form for data entry, including a date capture, which works fine, as follows:</font>
<br>
<br><font size=2 face="sans-serif"><i>Private Sub FinalDateCommand_Click()</i></font>
<br><font size=2 face="sans-serif"><i>'this allows user to enter final date in all displayed records by command button</i></font>
<br>
<br><font size=2 face="sans-serif"><i>On Error GoTo Err_FinalDateCommand_Click</i></font>
<br><font size=2 face="sans-serif"><i>Dim mydb As Database, myset As Recordset</i></font>
<br><font size=2 face="sans-serif"><i>Dim I As Integer</i></font>
<br><font size=2 face="sans-serif"><i>Dim n As Integer</i></font>
<br><font size=2 face="sans-serif"><i>Dim Finished As Date</i></font>
<br><font size=2 face="sans-serif"><i>Dim TSID As Integer</i></font>
<br><font size=2 face="sans-serif"><i>Dim strSQL As String</i></font>
<br>
<br><font size=2 face="sans-serif"><i>Set mydb = CurrentDb</i></font>
<br><font size=2 face="sans-serif"><i>Set myset = mydb.OpenRecordset("WorkSheet")</i></font>
<br>
<br><font size=2 face="sans-serif"><i>TSID = Forms![worksheet]![TSID]</i></font>
<br><font size=2 face="sans-serif"><i>Finished = Format(Forms![worksheet]![FinalDate], "mm\/dd\/yyyy")</i></font>
<br>
<br><font size=2 face="sans-serif"><i> ' Create SQL string.</i></font>
<br><font size=2 face="sans-serif"><i> strSQL = "UPDATE worksheet SET finished = #" & Finished & "# WHERE tsid = " & TSID</i></font>
<br><font size=2 face="sans-serif"><i> ' Run action query.</i></font>
<br><font size=2 face="sans-serif"><i> mydb.Execute strSQL</i></font>
<br>
<br><font size=2 face="sans-serif"><i>'refresh the records</i></font>
<br><font size=2 face="sans-serif"><i> DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70</i></font>
<br><font size=2 face="sans-serif"><i> </i></font>
<br><font size=2 face="sans-serif"><i>Exit_FinalDateCommand_Click:</i></font>
<br><font size=2 face="sans-serif"><i> Exit Sub</i></font>
<br>
<br><font size=2 face="sans-serif"><i>Err_FinalDateCommand_Click:</i></font>
<br><font size=2 face="sans-serif"><i> MsgBox Err.Description</i></font>
<br><font size=2 face="sans-serif"><i> Resume Exit_FinalDateCommand_Click</i></font>
<br><font size=2 face="sans-serif"><i> </i></font>
<br><font size=2 face="sans-serif"><i>End Sub</i></font>
<br>
<br><font size=2 face="sans-serif">This displays the date in the required format (ie: dd/mm/yy) as per the formatting of the box. </font>
<br><font size=2 face="sans-serif">from here however it is stored in a sub form which is displaying the date totally reversed (ie: yy/mm/dd).</font>
<br>
<br><font size=2 face="sans-serif"><i>Private Sub Form_BeforeUpdate(Cancel As Integer)</i></font>
<br>
<br><font size=2 face="sans-serif"><i>'store the finished date that you have just entered</i></font>
<br><font size=2 face="sans-serif"><i>finisheddate = Me![Finished]</i></font>
<br><font size=2 face="sans-serif"><i>End Sub</i></font>
<br>
<br><font size=2 face="sans-serif">The formatting on the fields in the form is set to shortdate and my PC has regional settings for Australia. </font>
<br>
<br><font size=2 face="sans-serif">I am really stuck (again) ... I hate Date issues in Access!</font>
<br>
<br>
<br><font size=2 face="sans-serif">Connie Kamrowski<br>
<br>
Analyst/Programmer<br>
Information Technology<br>
NSW Agriculture<br>
Orange<br>
<br>
Ph: 02 6391 3250<br>
Fax:02 6391 3290<br>
<br>
<br>
This message is intended for the addressee named and may contain confidential information. If you are not the intended recipient or received it in error, please delete the message and notify sender. Views expressed are those of the individual sender and are not necessarily the views of their organisation.</font>