My SQL works fine with the underscores I have in place now. Sometimes my SELECT statement gets real long and I can't seem to figure out how to continue the SELECT statement on an additional line of code. I am not great with SQL and it takes me time to figure out quotes vs. apostrophe enclosed quotes, etc. while using different data types. So I can not tell if I am doing something wrong or VBA just does not allow for this.
And how do I paste text within the body of my post so it appears in its own window in the body?
strWhere = ""
strWhere = "SELECT [qryMasterSum].[MoveDate], [qryMasterSum].[PickCity], [qryMasterSum].[DelCity], [qryMasterSum].[TruckDurringMove], [qryMasterSum].[EquipLicNum],[qryMasterSum].[Import]" _
& "FROM [qryMasterSum]" _
& "WHERE (qryMasterSum.DriverID)=" & glngDriverId & " AND ((qryMasterSum.MoveDate)>=#" & gdtDate & "#)AND (((qryMasterSum.MoveDate) <=#" & gdtDateEnd & "#))" _
& "ORDER BY [MoveDate];"