iankerry
Registered User.
- Local time
- Today, 23:44
- Joined
- Aug 10, 2005
- Messages
- 190
Hi
I have a routine that writes to an excel sheet from my database in the exact format i need to import into Quickbooks UK.
It all works well except for this routine which inserts a line, but it puts the date in the american format rather than UK.
I can't seem to find out how to make the format of the [datefield] to remain as dd/mm/yyyy] - in other part of the code it inserts that date correctly.
Would appreciate any ideas - hope the code is readable.
Ian
I have a routine that writes to an excel sheet from my database in the exact format i need to import into Quickbooks UK.
It all works well except for this routine which inserts a line, but it puts the date in the american format rather than UK.
I can't seem to find out how to make the format of the [datefield] to remain as dd/mm/yyyy] - in other part of the code it inserts that date correctly.
Would appreciate any ideas - hope the code is readable.
Ian
Code:
Do While Not .EOF
Application.DoCmd.RunSQL "INSERT INTO temp_tbl_QBData ([flicksfeedbackleft], class, [datefield], [cluster], [VENUE], [OverToQbooks], " & _
"[qNAME], [EventID], [film_name], [vatamount], [totalvat], [totalinv], [acct], [incomeAccount], [filmNameDescription], " & _
"[today], [WEBadultsold], [WEBchildsold], [VATCODE], [AdultTP], [ChildTP], [TOTALonlineSales]) VALUES (" & _
"'" & Replace(.Fields("flicksfeedbackleft").Value, "'", "''") & "'," & _
"'" & Replace(.Fields("class").Value, "'", "''") & "'," & _
"'" & Replace(.Fields("datefield").Value, "'", "''") & "'," & _
"'" & Replace(.Fields("cluster").Value, "'", "''") & "'," & _
"'" & Replace(.Fields("VENUE").Value, "'", "''") & "'," & _
"'" & Replace(.Fields("OverToQbooks").Value, "'", "''") & "'," & _
"'" & Replace(.Fields("qNAME").Value, "'", "''") & "'," & _
.Fields("EventID").Value & "," & _
"''," & _
.Fields("vatamount").Value & "," & _
.Fields("totalvat").Value & "," & _
.Fields("totalonlinesales").Value & "," & _
"'" & .Fields("acct").Value & "'," & _
"'Online Ticket Sales'," & _
"'Deduction of online ticket sales'," & _
"#" & Format(.Fields("today").Value, "mm\/dd\/yyyy") & "#," & _
.Fields("WEBadultsold").Value & "," & _
.Fields("WEBchildsold").Value & "," & _
"'O'," & _
.Fields("AdultTP").Value & "," & .Fields("ChildTP").Value & "," & .Fields("TOTALonlineSales").Value & ");"
.MoveNext
Loop
.Close