A
Anthony
I work for a company with numerous locations throughout the U.S. Each
location has their own AS400 system. I can connect to each location through
ODBC and query the databases using a pass-through query in Access 2002.
However, the table names in the SELECT statement MUST be structured like
this: "Libraryname.Tablename". If I put JUST the table name, the select
statement gives me an error basically telling me it can't find the table.
EACH location has identical table names but the Library name is slightly
different. The library name is identified as: "HOSPFXXX" with the "XXX"
being the location number. I would like to run the SAME query on multiple
locations WITHOUT having to edit the pass-through query statement each time
to put the new library name for each table in the query.
Is there any way to automate changing the library name in the pass-through
query to the new location each time I run the query? I am thinking of a
POPUP window that asks me the new library name, then it parses the new name
into the pass-through query statement, then runs the query. I don't know if
that is possible.
Thanks
location has their own AS400 system. I can connect to each location through
ODBC and query the databases using a pass-through query in Access 2002.
However, the table names in the SELECT statement MUST be structured like
this: "Libraryname.Tablename". If I put JUST the table name, the select
statement gives me an error basically telling me it can't find the table.
EACH location has identical table names but the Library name is slightly
different. The library name is identified as: "HOSPFXXX" with the "XXX"
being the location number. I would like to run the SAME query on multiple
locations WITHOUT having to edit the pass-through query statement each time
to put the new library name for each table in the query.
Is there any way to automate changing the library name in the pass-through
query to the new location each time I run the query? I am thinking of a
POPUP window that asks me the new library name, then it parses the new name
into the pass-through query statement, then runs the query. I don't know if
that is possible.
Thanks