Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
mr.bungle
 
Posts: n/a
Default SQL.REQUEST help needed

Having trouble trying to pull info into Excel from an Access table.

The last element of the SQL.REQUEST function is SELECT Client FROM
tblProject WHERE (ProjectRef=$A$1)

When $A$1 is an integer the function works ok, but I can't get it to
look for a text string. Is this a limitation of the function?

Any help appreciated.

mrb.
  #2   Report Post  
Alok
 
Posts: n/a
Default

When the field in access is a text field, you have to encolse the value in
single or double quotes as follows
tblProject WHERE (ProjectRef= & chr(34) & $A$1 & chr(34))

Note chr(34) is equivalent to a double quote.
Alok

"mr.bungle" wrote:

Having trouble trying to pull info into Excel from an Access table.

The last element of the SQL.REQUEST function is SELECT Client FROM
tblProject WHERE (ProjectRef=$A$1)

When $A$1 is an integer the function works ok, but I can't get it to
look for a text string. Is this a limitation of the function?

Any help appreciated.

mrb.

  #3   Report Post  
Andy Wiggins
 
Posts: n/a
Default

This file gives general help on the use of SQL.REQUEST. It might help:
http://www.bygsoftware.com/examples/...SqlRequest.zip
It's in the "Excel with Access Databases" section on page:
http://www.bygsoftware.com/examples/examples.htm

This workbook demonstrates how to get data direct from an MS Access table,
or from an open or closed MS Excel workbook using the workbook function
SQL.REQUEST.

Recently updated to show the use of SQL.REQUEST in the same workbook.

The code is open and commented.


--
Regards
-
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy



"mr.bungle" wrote in message
. ..
Having trouble trying to pull info into Excel from an Access table.

The last element of the SQL.REQUEST function is SELECT Client FROM
tblProject WHERE (ProjectRef=$A$1)

When $A$1 is an integer the function works ok, but I can't get it to
look for a text string. Is this a limitation of the function?

Any help appreciated.

mrb.



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
Comparison / Check Off between 2 excel sheets. HELP NEEDED! sax30 Excel Worksheet Functions 8 April 28th 05 09:13 AM
Does SQL.REQUEST work in Excel X? mrl Excel Discussion (Misc queries) 5 February 4th 05 08:36 PM
Excel formatting of text-- one cell needed Jonathan Graham Excel Discussion (Misc queries) 1 December 17th 04 03:56 PM
installing sql.request help sql.request help Excel Worksheet Functions 0 December 15th 04 10:17 PM
sql.request Nikon Excel Worksheet Functions 1 November 10th 04 12:05 PM


All times are GMT +1. The time now is 10:27 AM.

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

About Us

"It's about Microsoft Excel"