Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Get data from Access file

HI All,

Is it possible to populate a cell from a cell (if that’s what it’s
called) in an Access file?

The access file is called qcpProg.mdb in a directory level one above
the excel file.

The data is in the tProduct table, UnitCost field (currency), with the
Product Code field (text) that is equal to Joseph4.

It would save me a lot of manual updates if I could do this.

Thanks!

Michele
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 411
Default Get data from Access file

Hi Michele,

In excel 2000, I use Data Get External Data New Database query.

Would that work in your case?

Dan

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default Get data from Access file


"mjones" wrote in message
...

It says 'record(s) cannot be read; no read permission on tProduct.'



....then you likely have some different type of security set up in Access.
I'm not a big Access user, so I can't offer much help there.

You could try some of the other connection string listed here for Access:
http://www.connectionstrings.com/access
Look at the strings for "Microsoft Jet OLE DB 4.0" The one I used was
"With database password".

Tim


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Get data from Access file

On Feb 10, 10:49*pm, "Tim Williams" wrote:
"mjones" wrote in message

...

It says 'record(s) cannot be read; no read permission on tProduct.'


...then you likely have some different type of security set up in Access.
I'm not a big Access user, so I can't offer much help there.

You could try some of the other connection string listed here for Access:http://www.connectionstrings.com/access
Look at the strings for "Microsoft Jet OLE DB 4.0" * The one I used was
"With database password".

Tim


Wow, this is frustrating. I tried some of the options on Tim's link,
but I'm not skilled enough to understand what to do. There is a user
(michele) and a workgroup system file (qcpSystem.mdw in the same
folder as the access database). Can anyone help with the updated code
to add this information?

I had a third friend look at it (an Access programmer) and she didn't
know what the problem was either.

Is Option Explicit supposed to be at the top of the module?

I tried copying the code into a blank spreadsheet. Same thing. Sign.

Thanks again everyone and anyone who can help,

Michele
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default Get data from Access file


"mjones" wrote in message
...
Yeah, yeah!!! It works!! Yeah, yeah!!
Thanks a bunch!!



At last! Good to hear.

Tim




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Get data from Access file

On Feb 13, 12:16*am, "Tim Williams" wrote:
"mjones" wrote in message

...

Yeah, yeah!!! *It works!! *Yeah, yeah!!
Thanks a bunch!!


At last! *Good to hear.

Tim


Hi Tim,

I hate to bug you again, but is there a way to make the GetUnitCost
keep the format of the cell it's in, or at least format it to a number
or currency with 2 decimal places? Some of the costs are coming out
with 4 decimal places.

Thanks again,

Michele
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default Get data from Access file

Sorry - a formula can't directly impose any formatting on the cell which
contains it: it can only return a value.

You'll need to format the cell the usual way.

Tim



"mjones" wrote in message
...
On Feb 13, 12:16 am, "Tim Williams" wrote:
"mjones" wrote in message

...

Yeah, yeah!!! It works!! Yeah, yeah!!
Thanks a bunch!!


At last! Good to hear.

Tim


Hi Tim,

I hate to bug you again, but is there a way to make the GetUnitCost
keep the format of the cell it's in, or at least format it to a number
or currency with 2 decimal places? Some of the costs are coming out
with 4 decimal places.

Thanks again,

Michele


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Get data from Access file

On Feb 15, 8:51*pm, "Tim Williams" wrote:
Sorry - a formula can't directly impose any formatting on the cell which
contains it: it can only return a value.

You'll need to format the cell the usual way.

Tim

"mjones" wrote in message

...
On Feb 13, 12:16 am, "Tim Williams" wrote:

"mjones" wrote in message


....


Yeah, yeah!!! It works!! Yeah, yeah!!
Thanks a bunch!!


At last! Good to hear.


Tim


Hi Tim,

I hate to bug you again, but is there a way to make the GetUnitCost
keep the format of the cell it's in, or at least format it to a number
or currency with 2 decimal places? *Some of the costs are coming out
with 4 decimal places.

Thanks again,

Michele


Naturally, I thought to format the cell directly in the spreadsheet,
i.e. Format Cells Number with 2 decimal places, but it just ignors
the format. The values shown look like 15.2263 where some have 2
decimal places, others 3, etc.

Tim, your code is great and I've found another good use for it except
this time, I've getting a few duplicates in the ProductCode field. A
tie breaker is needed. Can I adjust he code to say select Referrer
from tClient where LName and FnameF. In other words, could I say in
the cell =GetUnitCost(A1) except have two values like (A1,A2)?

Thanks again!!
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
import excel file to access but only new data Daniel M Excel Programming 1 December 6th 07 11:44 AM
Refresh Data if Access File has Password Mike H. Excel Programming 0 October 19th 07 12:33 PM
Access data on spreadsheet without accessing the file?... Dan Brimley Excel Discussion (Misc queries) 6 May 25th 07 07:27 AM
Write data to access file through EXCEL Billy[_2_] Excel Programming 4 November 27th 03 04:48 PM
excel to manage access data file shin Excel Programming 0 November 21st 03 08:02 PM


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"