Chris Mackin
chris at denverdb.com
Tue Apr 8 22:35:12 CDT 2003
Try renaming the [Date] field to anything that's NOT a reserve keyword. A field name should never be one of the Access reserved keywords (here's a list: http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q209187) Change the name of the field "Date" to "MyDateField" or whatever and try it again. Chris Mackin www.denverdb.com Denver Database Consulting, LLC -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Software Design & Solutions Pty Ltd. Sent: Tuesday, April 08, 2003 9:19 PM To: AccessD at databaseadvisors.com Subject: [AccessD] HELP - Date in SQL string Hi all (A2K) This line of code works: strsql = "INSERT INTO tblItemsInQuote (quoteID, Sequence) VALUES (" & IntQuoteID & "," & StrDayNo & ")" The debug shows result as: INSERT INTO tblItemsInQuote (quoteID, Sequence) VALUES (1,1) But I cannot get it right when I amend it to also populate a date field, ie using: strsql = "INSERT INTO tblItemsInQuote (quoteID, Date, Sequence) VALUES (" & IntQuoteID & ",#" & DteDay1 & "#," & StrDayNo & ")" The debug shows it as: INSERT INTO tblItemsInQuote (quoteID, Date, Sequence) VALUES (1,#01/04/03#,1) TIA Kath Pelletti Software Design & Solutions Pty Ltd. Ph: 9505-6714 Fax: 9505-6430 SDSSoftware at Optusnet.com.au