Hi chaps
I am a little stumped here. I have created a simple SELECT sql script which works fine if I make the "WHERE" part of the query refer to a specific record, but if I use a wildcard, the process errors saying that no records are found even though I know there are records that meet the criteria.
Does anyone have any ideas or thoughts?
********************************
I am using access 2003 - the VBA editor is version 6.3
********************************
this works:
Dim MySql As String
MySql = MySql & " SELECT [CURRENT POLICY #]"
MySql = MySql & " FROM [C01 RENEWAL TABLE]"
MySql = MySql & " WHERE ([CURRENT POLICY #] LIKE 'COM002000')"
MySql = MySql & " order by [CURRENT POLICY #]"
********************************
this doesn't:
Dim MySql As String
MySql = MySql & " SELECT [CURRENT POLICY #]"
MySql = MySql & " FROM [C01 RENEWAL TABLE]"
MySql = MySql & " WHERE ([CURRENT POLICY #] LIKE 'COM*')"
MySql = MySql & " order by [CURRENT POLICY #]"
I am a little stumped here. I have created a simple SELECT sql script which works fine if I make the "WHERE" part of the query refer to a specific record, but if I use a wildcard, the process errors saying that no records are found even though I know there are records that meet the criteria.
Does anyone have any ideas or thoughts?
********************************
I am using access 2003 - the VBA editor is version 6.3
********************************
this works:
Dim MySql As String
MySql = MySql & " SELECT [CURRENT POLICY #]"
MySql = MySql & " FROM [C01 RENEWAL TABLE]"
MySql = MySql & " WHERE ([CURRENT POLICY #] LIKE 'COM002000')"
MySql = MySql & " order by [CURRENT POLICY #]"
********************************
this doesn't:
Dim MySql As String
MySql = MySql & " SELECT [CURRENT POLICY #]"
MySql = MySql & " FROM [C01 RENEWAL TABLE]"
MySql = MySql & " WHERE ([CURRENT POLICY #] LIKE 'COM*')"
MySql = MySql & " order by [CURRENT POLICY #]"
Last edited: