Problem using where with date in SQL Statement

by ChuckK   Last Updated May 16, 2019 00:26 AM

I am trying to execute a SQL statement in a vba script. I have gotten the script to run, but it ignores the where with a date filter.

I haved researched and tried every option I can find, but just cant seem to get it to work.

Set rs = conn.Execute("Select [adjustment_number], [status], [tax_adjusted],[amount], [gl_date],[creation_date],[apply_date],[comments],[type],[adjustment_type],[dbo].[Code_Combinations].[segment1], [dbo].[Code_Combinations].[segment10],[dbo].[Code_Combinations].[segment11],[dbo].[Code_Combinations].[segment12],[dbo].[Code_Combinations].[code_combination] FROM [dbo].[AR_ADJUSTMENTS_ALL] " & _ "left outer join [dbo].[Code_Combinations] on [dbo].[AR_ADJUSTMENTS_ALL].[CODE_COMBINATION_ID] = [dbo].[Code_Combinations].[CODE_COMBINATION_ID] where [gl_date] >= " & gldate & ";")

Tags : sql excel vba date


Related Questions


Updated October 13, 2018 10:26 AM

Updated March 19, 2019 19:26 PM

Updated April 05, 2017 17:26 PM

Updated May 04, 2017 01:26 AM