ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ADO read of Access... (https://www.excelbanter.com/excel-programming/413549-ado-read-access.html)

Deke

ADO read of Access...
 
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...

Mike

ADO read of Access...
 
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...


Tim Williams

ADO read of Access...
 
Use the SQL "like" operator

Tim

"Deke" wrote in message
...
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...





All times are GMT +1. The time now is 09:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com