dbTalk Databases Forums  

Excel Spreadsheel linked to Access DB

comp.databases.ms-access comp.databases.ms-access


Discuss Excel Spreadsheel linked to Access DB in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jovi07@verizon.net
 
Posts: n/a

Default Excel Spreadsheel linked to Access DB - 04-20-2009 , 11:15 AM






Hi all,

I have an excel spreadsheet that is linked to an access query.
The query returns daily revenue info (claim#, product, trade date and
commission.

This works fine but now I have to return only ethanol products. If
I put in the query criteria "Ethanol" I get only ethanol products.
Since there are more than 1 products with the name ethanol in it, I
use Like "*Ethanol*" in the criteria.

In access the query runs fine and will return all records that have
Ethanol in the product name. When I refresh the spreadsheet nothing
is returned.

Is there any reason why no records are returns while is use Like
Like "*Ethanol*"? Also is it possible to pass the date from excel to
the access query to return records for a specific date. Current i only
return records for the current date.

I am posting here but will also post this message in an excel group
since I'm not sure if I need an Access or Excel guru to solve this
problem.

Any help is greatly appreciated,

Joe V


Reply With Quote
  #2  
Old   
Salad
 
Posts: n/a

Default Re: Excel Spreadsheel linked to Access DB - 04-20-2009 , 11:24 AM






jovi07 (AT) verizon (DOT) net wrote:

You state "In access the query runs fine and will return all records
that have Ethanol in the product name. When I refresh the spreadsheet
nothing is returned."

What do you mean, refresh the spreadsheet? Are you running the query in
Access and expecting the result in Excel?


Quote:
Hi all,

I have an excel spreadsheet that is linked to an access query.
The query returns daily revenue info (claim#, product, trade date and
commission.

This works fine but now I have to return only ethanol products. If
I put in the query criteria "Ethanol" I get only ethanol products.
Since there are more than 1 products with the name ethanol in it, I
use Like "*Ethanol*" in the criteria.

In access the query runs fine and will return all records that have
Ethanol in the product name. When I refresh the spreadsheet nothing
is returned.

Is there any reason why no records are returns while is use Like
Like "*Ethanol*"? Also is it possible to pass the date from excel to
the access query to return records for a specific date. Current i only
return records for the current date.

I am posting here but will also post this message in an excel group
since I'm not sure if I need an Access or Excel guru to solve this
problem.

Any help is greatly appreciated,

Joe V


Reply With Quote
  #3  
Old   
jovi07@verizon.net
 
Posts: n/a

Default Re: Excel Spreadsheel linked to Access DB - 04-20-2009 , 11:41 AM



The query is in an access db and works if I run the query in access.

When the query has "Ethanol" in the criteria, I open the spreadsheet
and refresh it (alt +F5) to get new records that where entered today.
This works fine, but as I stated I need all products with the word
"Ethanol" in it, so I cahnge the query in Access and use in the
criteria Like "*Ethanol*". I then refresh the spreadsheet (Alt + F5).
Instead of getting all records with the word Ethanol in the product, I
get a blank spreadsheet.

This is the 1st time I ever linked a spreadsheet to an access query
but it seems Excel doesn't like it when I use Like "*Ethanol* in the
criteria of the access query.



Reply With Quote
  #4  
Old   
MGFoster
 
Posts: n/a

Default Re: Excel Spreadsheel linked to Access DB - 04-20-2009 , 04:21 PM



jovi07 (AT) verizon (DOT) net wrote:
Quote:
The query is in an access db and works if I run the query in access.

When the query has "Ethanol" in the criteria, I open the spreadsheet
and refresh it (alt +F5) to get new records that where entered today.
This works fine, but as I stated I need all products with the word
"Ethanol" in it, so I cahnge the query in Access and use in the
criteria Like "*Ethanol*". I then refresh the spreadsheet (Alt + F5).
Instead of getting all records with the word Ethanol in the product, I
get a blank spreadsheet.

This is the 1st time I ever linked a spreadsheet to an access query
but it seems Excel doesn't like it when I use Like "*Ethanol* in the
criteria of the access query.
If you use the Excel "Data > Get External Data > Create Query" menu
option you can use MSQuery to build a query on the Access tables.
Instead of using LIKE "*Ethanol*" you'd use LIKE '%Ethanol%' - note the
single quotes and the % wildcard in place of double quotes and the *
wildcard. Using MSQuery usually guarantees you'll get the data w/o
worrying about any Access built-in functions that Excel won't recognize.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **


Reply With Quote
  #5  
Old   
jovi07@verizon.net
 
Posts: n/a

Default Re: Excel Spreadsheel linked to Access DB - 04-20-2009 , 11:19 PM



On Apr 20, 5:21 pm, MGFoster <m... (AT) privacy (DOT) com> wrote:

I made the change to use MS Query instead of Access query and its
works prefectly.

Thanks for you help

Quote:
jov... (AT) verizon (DOT) net wrote:
The query is in an access db and works if I run the query in access.

When the query has "Ethanol" in the criteria, I open the spreadsheet
and refresh it (alt +F5) to get new records that where entered today.
This works fine, but as I stated I need all products with the word
"Ethanol" in it, so I cahnge the query in Access and use in the
criteria Like "*Ethanol*". I then refresh the spreadsheet (Alt + F5).
Instead of getting all records with the word Ethanol in the product, I
get a blank spreadsheet.

This is the 1st time I ever linked a spreadsheet to an access query
but it seems Excel doesn't like it when I use Like "*Ethanol* in the
criteria of the access query.

If you use the Excel "Data > Get External Data > Create Query" menu
option you can use MSQuery to build a query on the Access tables.
Instead of using LIKE "*Ethanol*" you'd use LIKE '%Ethanol%' - note the
single quotes and the % wildcard in place of double quotes and the *
wildcard. Using MSQuery usually guarantees you'll get the data w/o
worrying about any Access built-in functions that Excel won't recognize.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **




Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.