jimday1982
Registered User.
- Local time
- Today, 18:21
- Joined
- May 13, 2004
- Messages
- 81
I have a form with the text boxes you see below and for some reason, when the code below executes, it is not formatting the date like I have specified (4 digits in the date). It's only using 2 digits. Any ideas on why this isn't working?
strSQL = "insert into exported_data ( [first name], [last name], [zip-code], [order number], " & _
"[tracking number], [carrier], [date shipped], [memo], ) " & _
"values ('" & ![first name] & "', '" & ![last name] & "', " & ![zip-code] & ", " & ![order number] & _
", '" & ![tracking number] & "', '" & ![carrier] & "', #" & Format(![date shipped], "mm/dd/yyyy") & "#, '" & _
![memo] & "', '" & ![email] & "' )"
DoCmd.RunSQL strSQL
Actually this code works fine on my computer, but another computer, running the same copy of access is hellbent on not diplaying the year with 4 digits even though I'm specifying it...why in the world would it be doing this?
strSQL = "insert into exported_data ( [first name], [last name], [zip-code], [order number], " & _
"[tracking number], [carrier], [date shipped], [memo], ) " & _
"values ('" & ![first name] & "', '" & ![last name] & "', " & ![zip-code] & ", " & ![order number] & _
", '" & ![tracking number] & "', '" & ![carrier] & "', #" & Format(![date shipped], "mm/dd/yyyy") & "#, '" & _
![memo] & "', '" & ![email] & "' )"
DoCmd.RunSQL strSQL
Actually this code works fine on my computer, but another computer, running the same copy of access is hellbent on not diplaying the year with 4 digits even though I'm specifying it...why in the world would it be doing this?
Last edited: