"J. Shrimp, Jr." <ju***********@hotmail.com> wrote in message
news:11*************@corp.supernews.com...
Got small tables - hundreds of 'em.
If someone selects a table to view,
don't wanna create a hundred forms
Planning on creating a temp table
and emptying, then appending data
from selected table (there's only one field
in all the tables and its a datasheet form).
Will base form on that one temp table.
Each time a new table is selected,
the process will start again.
Seems like many postings here are down on
temp tables, so I was planning on trying
using a querydef as source, but don't
know how.
You could try having a form with a recordsource which is sent in the
OpenArgs when you open the form. For example, if you had two tables:
tblStudent, tblTeacher you could have two queries:
SELECT tblStudent.StdFirstName AS FirstName, tblStudent.StdLastName AS
LastName FROM tblStudent
SELECT tblTeacher.TchFirstName AS FirstName, tblTeacher.TchLastName AS
LastName FROM tblTeacher
Your form then has fields bound to the fields FirstName and LastName. It
doesn't matter that neither table has the field FirstName - each query has
an alias for this field.
Of course, if you have hundreds of tables with datasets to be displayed in a
similar manner, then perhaps these tables deserve to be consolidated into
one table.