txgeekgirl
Registered User.
- Local time
- Today, 07:52
- Joined
- Jul 31, 2008
- Messages
- 187
I have a Global Variable MyOpenForm which returns the correct name of the form opened.
My_SQL = "INSERT INTO [Activities Report Data] ([TS_Staff], [TS_Date], [TS_Time], [TS_Index], [TS_Note]) " + _
"SELECT " + [Forms]![MyOpenForm]![User_Echo] + ", #" + D_Date + "#, '" + Left$(Target, 2) + "15', 208, ''"
DoCmd.RunSQL My_SQL
I am trying to stuff it into this SQL statement but it is NOT happy. Any suggestions?
My_SQL = "INSERT INTO [Activities Report Data] ([TS_Staff], [TS_Date], [TS_Time], [TS_Index], [TS_Note]) " + _
"SELECT " + [Forms]![MyOpenForm]![User_Echo] + ", #" + D_Date + "#, '" + Left$(Target, 2) + "15', 208, ''"
DoCmd.RunSQL My_SQL
I am trying to stuff it into this SQL statement but it is NOT happy. Any suggestions?