Mr Clevver
Idiot Savant
- Local time
- Today, 12:13
- Joined
- Jun 26, 2008
- Messages
- 17
Hey again,
I'm having issue with an unbound textbox, which sits in an unbound form. Upon clicking the 'Save & Exit' button it is supposed to update the date field in a table (tEvents) with the SQL UPDATE query:
stSQL1 = "UPDATE tEvents SET tEvents.Username = " & "'" & Me.txtUsername & "'" & ", tEvents.EventDescription = " & "'" & Me.txtEventDescription & "'" & ", tEvents.EventDate = " & "#" & Format(Me.txtEventDate, "DD/MM/YYYY") & "#" & " WHERE (((tEvents.EventID)=" & Me.txtEventID & "));"
This has been working since it rolled out a week ago, but this week if I try to save the record for any event that has been tagged for next month it changes the date from, DD/MM/YYYY to MM/DD/YYYY; so 01/07/2009 becomes 07/01/2009. I added the Format(Me.txtEventDate, "DD/MM/YYYY") to the query to see if this would help, but it doesn't seem to be.
Client and server machines are all set to DD/MM/YYYY format.
Any ideas what I could do to force the query into ensuring that the dates are added in DD/MM/YYYY format? Or is this something I could be doing at form level?
Thanks.
PS. Oddly enough, the INSERT query that creates the record, on the same form, seems to work perfectly, though it fetches the date from the exact same textbox.
I'm having issue with an unbound textbox, which sits in an unbound form. Upon clicking the 'Save & Exit' button it is supposed to update the date field in a table (tEvents) with the SQL UPDATE query:
stSQL1 = "UPDATE tEvents SET tEvents.Username = " & "'" & Me.txtUsername & "'" & ", tEvents.EventDescription = " & "'" & Me.txtEventDescription & "'" & ", tEvents.EventDate = " & "#" & Format(Me.txtEventDate, "DD/MM/YYYY") & "#" & " WHERE (((tEvents.EventID)=" & Me.txtEventID & "));"
This has been working since it rolled out a week ago, but this week if I try to save the record for any event that has been tagged for next month it changes the date from, DD/MM/YYYY to MM/DD/YYYY; so 01/07/2009 becomes 07/01/2009. I added the Format(Me.txtEventDate, "DD/MM/YYYY") to the query to see if this would help, but it doesn't seem to be.
Client and server machines are all set to DD/MM/YYYY format.
Any ideas what I could do to force the query into ensuring that the dates are added in DD/MM/YYYY format? Or is this something I could be doing at form level?
Thanks.
PS. Oddly enough, the INSERT query that creates the record, on the same form, seems to work perfectly, though it fetches the date from the exact same textbox.