PC Review


Reply
Thread Tools Rate Thread

ADO read of Access...

 
 
Deke
Guest
Posts: n/a
 
      4th Jul 2008
I am using the routines the Ron de Bruin has on his website to do an ADO read
of an Access database and return the results to Excel.

This is working great for all the queries I have done, up until now.

I need a new query, but the selction criteria for the record has to match
only part of the field contents, e.g. I want to search for "TST", but the
fields contain "TST Network", "TST DBA Mainframe".

Basically, I need to return all the records that contain "TST" at the
beginning of the field.

Thank's in advance for any help...

--
Cheers...
 
Reply With Quote
 
 
 
 
Mike
Guest
Posts: n/a
 
      4th Jul 2008
SELECT Table1.*, IIf(Left([Field2],3)="TST","Yes","No") AS leftValue
FROM Table1
WHERE (((IIf(Left([Field2],3)="TST","Yes","No"))="Yes"));

"Deke" wrote:

> I am using the routines the Ron de Bruin has on his website to do an ADO read
> of an Access database and return the results to Excel.
>
> This is working great for all the queries I have done, up until now.
>
> I need a new query, but the selction criteria for the record has to match
> only part of the field contents, e.g. I want to search for "TST", but the
> fields contain "TST Network", "TST DBA Mainframe".
>
> Basically, I need to return all the records that contain "TST" at the
> beginning of the field.
>
> Thank's in advance for any help...
>
> --
> Cheers...

 
Reply With Quote
 
Tim Williams
Guest
Posts: n/a
 
      4th Jul 2008
Use the SQL "like" operator

Tim

"Deke" <(E-Mail Removed)> wrote in message
news:A0666CAD-8259-4D1D-A784-(E-Mail Removed)...
>I am using the routines the Ron de Bruin has on his website to do an ADO
>read
> of an Access database and return the results to Excel.
>
> This is working great for all the queries I have done, up until now.
>
> I need a new query, but the selction criteria for the record has to match
> only part of the field contents, e.g. I want to search for "TST", but the
> fields contain "TST Network", "TST DBA Mainframe".
>
> Basically, I need to return all the records that contain "TST" at the
> beginning of the field.
>
> Thank's in advance for any help...
>
> --
> Cheers...



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Access 2003 / 2007 Runtime - is read only or read/write possibl =?Utf-8?B?S0U=?= Microsoft Access 3 20th Mar 2007 06:13 PM
cannot be read; no read permission on table in Access =?Utf-8?B?amltdA==?= Microsoft Frontpage 1 18th May 2006 07:49 PM
Binary data stored in SQL Server: can't read from ASP.NET, *can* read from Access? Doug Microsoft ASP .NET 3 4th Nov 2005 07:35 PM
Access 2003 crash when reading read-only files in Access 2000 form =?Utf-8?B?V2lsbGVtLURlcmsgTmlqZGFt?= Microsoft Access 0 21st Jun 2004 09:54 AM
changing a Access Database from read only to read/write Hunter Microsoft Access Security 0 2nd Jan 2004 03:48 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:36 AM.