Re: Table selection in query
- From: "Aaron" <Aaron@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 12 Aug 2005 17:39:46 -0700
Hi Duane,
Thank you for clarifying. Maybe I need to rethink the way that database
will work. I was looking at trying to automate the database by creating a
macro to run that will copy the current table into a new table, clear the
data from the current table, import the data into the current table and then
the query could run against either the new table or the current table.
Thank you,
Aaron
"Duane Hookom" wrote:
> Are you looking for a better method than using the union query?
>
> --
> Duane Hookom
> MS Access MVP
>
>
> "Aaron" <Aaron@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:DE8E3C44-A8FA-4B7F-ABFB-3E505608BE87@xxxxxxxxxxxxxxxx
> > Hi Duane,
> >
> > Thank you for your help! The reason for multiple tables with the same
> > structure is that we would like to keep history on the fields. I was
> > thinking that we could run one query against these tables should we
> > require
> > to obtain historical information. Is there a better way of doing this?
> >
> > Thank you,
> > Aaron
> >
> > "Duane Hookom" wrote:
> >
> >> The question is "why do you have multiple tables with the same
> >> structure"?
> >> You can stick them together in a union query like:
> >>
> >> Select "First" as TableName, Field1, Field2, Field3, Field4,...
> >> FROM tblFirst
> >> UNION ALL
> >> Select "Second", Field1, Field2, Field3, Field4,...
> >> FROM tblSecond
> >> UNION ALL
> >> Select "Third", Field1, Field2, Field3, Field4,...
> >> FROM tblThird;
> >>
> >> You can then run a query the sets a criteria by the derived TableName
> >> field.
> >>
> >> --
> >> Duane Hookom
> >> MS Access MVP
> >>
> >>
> >> "Aaron" <Aaron@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> >> news:89DFD696-ECE8-4ED4-9F2E-DE2F163117CA@xxxxxxxxxxxxxxxx
> >> > Hi,
> >> > Is there a way in Access to be able to prompt for the table name that
> >> > you
> >> > would like to run a query against? What I'm trying to do is to create
> >> > one
> >> > query to access different tables with the same fields but different
> >> > values.
> >> > Can Access accomplish this?
> >>
> >>
> >>
>
>
>
.
- Follow-Ups:
- Re: Table selection in query
- From: Duane Hookom
- Re: Table selection in query
- References:
- Table selection in query
- From: Aaron
- Re: Table selection in query
- From: Duane Hookom
- Re: Table selection in query
- From: Aaron
- Re: Table selection in query
- From: Duane Hookom
- Table selection in query
- Prev by Date: Re: Don't show text box under certain conditions
- Next by Date: Re: how to UPDATE LINKED tables?
- Previous by thread: Re: Table selection in query
- Next by thread: Re: Table selection in query
- Index(es):
Relevant Pages
|