View Single Post
  #2  
Old June 23rd, 2004, 05:10 PM
John Vinson
external usenet poster
 
Posts: n/a
Default Table name as parameter in SQL query

On Wed, 23 Jun 2004 05:48:03 -0700, Art
wrote:

Hi,

I'd like to create a query in Access that will prompt me for the table name from which to get the data. Since I'm not very familiar with SQL I normally create a query using the QBE grid, switch to SQL view and make changes.

Ultimately I'm going to use this query from a VB.net program and will be looping through a sequence of tables as my data sources.

I'd appreciate any help, hints or suggestions.


You cannot pass a table name as a Parameter to a query; you'll have to
have your VB.Net program actually construct a SQL string.

I'm queasy about your table design - multiple identically-structured
tables are generally A Bad Idea. Are you storing data in tablenames?
What are these tables?

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public