LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default From Access to Excel Question - VBA review

Hi -

I have three questions on the following code:

querystring = "SELECT * " & "FROM `" & ThisWorkbook.Path & _
"\MYDATA`.Mytable Mytable " _
& "WHERE Mytable.Dstacctunit =" & "10010"

1) Instead of referencing a Table, can I reference a Query? If yes, does the
code need to change to recognize I want to refer to a Query instead of a
Table?
2) Do the names of the column Headers (Query or Table) have to be
contiguous, without spaces (example: DSTACCTUNIT, instead of DST ACCT UNIT)?
3) Instead of referencing the true column Names, can I reference a variable
that would include the column name? If yes, Can I then have the headers with
the spaces (DST ACCT UNIT)? Can you give me a tip on how to include the
column names in a variable?

Thank you!!


 
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
Access to Excel Question Bunky Excel Discussion (Misc queries) 2 March 1st 09 05:14 PM
Excel / Access Question Les Stout[_2_] Excel Programming 1 May 7th 07 06:29 PM
Excel vs Access what art the question? PhilMontUSDA Excel Programming 10 July 23rd 05 09:07 PM
excel review bar broke Excel Discussion (Misc queries) 2 May 5th 05 04:46 PM
Excel to Access Question Nonlinear Excel Programming 1 September 19th 03 09:46 PM


All times are GMT +1. The time now is 08:13 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"