John W. Colby
jcolby at colbyconsulting.com
Mon Nov 17 21:53:36 CST 2003
"SELECT " & strNewEventName & " AS fldName This assumes that you want the contents of strNewEventName "interpreted" and that value of the variable placed in the string. John W. Colby www.ColbyConsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of John Bartow Sent: Monday, November 17, 2003 10:42 PM To: AccessD Subject: [AccessD] I need someone to unlock my brainjam! "strNewEventName" is a string variable I need to insert in this statement and after a half an hour I can't seem to get the syntax correct. DoCmd.RunSQL "INSERT INTO tblEvent ( fldName, " & _ "fldEvTypeID, fldOccur, fldLocation, " & _ "fldDesc, fldDeptID, fldRecorded, " & _ "fldStaffID ) " & _ "SELECT strNewEventName AS fldName, tblEvent." & _ "fldEvTypeID, tblEvent.fldOccur, tblEvent." & _ "fldLocation, tblEvent.fldDesc, tblEvent." & _ "fldDeptID, tblEvent.fldRecorded, " & _ "tblEvent.fldStaffID " & _ "FROM tblEvent;" TIA JB _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com