Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default LIKE won't work in VBA/ADO app

I'm calling an Access DB from Excel, and on some queries, I want to use LIKE. But I always get an empty recordset, even if there are matching records! The query looks like this:

SELECT * FROM Person WHERE [Name] LIKE 'Gu*' ORDER BY [Name]

Is there anything wrong with this query? If I write out the full name (LIKE 'Gustaf') I get a matching record.

Gustaf
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default LIKE won't work in VBA/ADO app

Try LIKE 'Gu%'

RBS


"Gustaf" wrote in message
...
I'm calling an Access DB from Excel, and on some queries, I want to use
LIKE. But I always get an empty recordset, even if there are matching
records! The query looks like this:

SELECT * FROM Person WHERE [Name] LIKE 'Gu*' ORDER BY [Name]

Is there anything wrong with this query? If I write out the full name
(LIKE 'Gustaf') I get a matching record.

Gustaf


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default LIKE won't work in VBA/ADO app

RB Smissaert wrote:
Try LIKE 'Gu%'


It worked! Thank you!

Gustaf
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to update a column in a work based on another work sheet WickerMan New Users to Excel 1 December 4th 09 12:58 PM
HOW TO MAKE A LIST OF WORK SHEET IN WORK BOOK IN EXCEL 2007 goutam Excel Programming 1 February 1st 08 07:40 AM
If I have a work sheet protected and try to run a macro to hide rows or columns it won't work. Correct? Marc Excel Programming 2 July 12th 06 04:10 AM
Counting dates in multiple work sheets and work books Savage Excel Discussion (Misc queries) 0 December 19th 05 11:41 PM
Is there away to keep "auto save" from jumping to the first work sheet in the work book? Marc New Users to Excel 2 April 21st 05 01:27 AM


All times are GMT +1. The time now is 06:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"