dynamic table referencing

  • Thread starter Thread starter tap197
  • Start date Start date
T

tap197

Guest
Hello,

ok, here's the problem... and this may be a twofold problem. I have a query that is manipulating data from a table... but I am recieving different tables which I need manipulated. Each of these tables is called something different but each includes the key fields which I am interested in ( Road numbers and a certain date). Is there a way that I can have the user input what the name of the table they are interested in is? Also the name of the key fields change... sometimes the Road Number column is called "Road_Num", other times it is "RN", etc. Is there a way the user could just enter the names of the corresponding column headers?

I've tried to do this by making a seperate "Input" table that the user inputed the corresponding data.. "Table Name", "RN column heading", "MOD date column heading". Can't work like that I guess...

Last but not least, After the calculations are complete I need to display them along with all of the original fields in the table. This is proving to be difficult because each table contains different columns. Is there any way to have a query display all fields in a table automatically? Without going into design view and adding each field by hand?

Thanks,
-Tim Perkins
 
I have more than one table in my query... need to display all columns in only the one table "EPIC" for example and other certain static columns from other tables. How can i have the columns I want from tables 2 and 3 to always be displayed while at the same time displaying all of the columns from table EPIC?
 
I'm still pretty new at this, but it sounds like your database doesn't have the best design. i'd say search for 'normalization' or 1st normal form to find out how to make more efficient tables....

or

you could make a table that contains a column for table name, a column for road number, etc to keep track of your inconsistent column names, and refer to it to get the appropriate table and column names.
 

Users who are viewing this thread

Back
Top Bottom