Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default import database tabase

Hello,

I recorded the macro that creates a query table from MS Access. I'm
replacing the "Where..." SQL to something more flexible. ie, In excel I'm
allowing user to pick the criteria from 20+ fields (from a pivot). I'd like
to add to SQL all those fields that have a selection other than "All". (I'm
doing this because my end product can only be a query table).

I'm noticing that the querytable only refreshes with certain fields. Some
field selections do not work. Where could I find the requirements for the
string?

My field names/data are sometimes numbers, text (but numeric),
single/multiple words, phrases with "," or ".". I noticed that sometimes I
need to use " ' " and sometimes " ` ". But in what cases should I be using
them? Also, of field names are two words, should I use []?

Thanks,
Carmen
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default import database tabase

In general terms, it depends on the type of the field in the database. If
the field is type text then the value you are looking for needs to be
enclosed in quotes. If the field name has spaces in it then it needs to be
enclosed in [ ] Like [Field Name] = 'value'

Since you recorded a macro to show you how to make the query, you could
always record one where you set a condition on each of the fields to see what
is recorded for each field.

Peter Richardson

"Carmen" wrote:

Hello,

I recorded the macro that creates a query table from MS Access. I'm
replacing the "Where..." SQL to something more flexible. ie, In excel I'm
allowing user to pick the criteria from 20+ fields (from a pivot). I'd like
to add to SQL all those fields that have a selection other than "All". (I'm
doing this because my end product can only be a query table).

I'm noticing that the querytable only refreshes with certain fields. Some
field selections do not work. Where could I find the requirements for the
string?

My field names/data are sometimes numbers, text (but numeric),
single/multiple words, phrases with "," or ".". I noticed that sometimes I
need to use " ' " and sometimes " ` ". But in what cases should I be using
them? Also, of field names are two words, should I use []?

Thanks,
Carmen

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 from Excel into database using jet in VB.net Andy HP Excel Discussion (Misc queries) 0 February 7th 08 08:33 AM
database query not showing foxpro database How I import data mangat New Users to Excel 1 June 24th 07 03:31 PM
OT? Microsoft Works Database Import? Lee Harris Excel Worksheet Functions 2 November 22nd 05 03:33 PM
import paradox database into excel fange Excel Discussion (Misc queries) 1 August 19th 05 03:20 PM
Import of Database VB app into Excel Spreadsheet No Name Excel Programming 0 February 19th 04 06:23 PM


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

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"