From: jschping on
Hi,

Is there any way to code a text box to display the name of the table that
I'm using for my query? I don't want to hard code it, since I have other code
that changes the RecordSet property.

Is there a way to have it dynamically become the name of the table that one
of the fields is coming from?

Thanks,

John Schping
From: Barry A&P on
john
to get the query name use something like =RecordSource
in the unbound textboxes recordsource
then use a query name that references the tables name

Barry

"jschping" wrote:

> Hi,
>
> Is there any way to code a text box to display the name of the table that
> I'm using for my query? I don't want to hard code it, since I have other code
> that changes the RecordSet property.
>
> Is there a way to have it dynamically become the name of the table that one
> of the fields is coming from?
>
> Thanks,
>
> John Schping
From: John W. Vinson on
On Fri, 5 Mar 2010 08:48:01 -0800, jschping
<jschping(a)discussions.microsoft.com> wrote:

>Hi,
>
>Is there any way to code a text box to display the name of the table that
>I'm using for my query? I don't want to hard code it, since I have other code
>that changes the RecordSet property.
>
>Is there a way to have it dynamically become the name of the table that one
>of the fields is coming from?
>
>Thanks,
>
>John Schping

Not easily, since a Query could very well reference more than one table: you
can have Joins, Subqueries, DLookUps... the expression "the table" is
ambiguous!

How do these recordsets differ? Do you perhaps have several
identically-structured tables for different subsets of your data? If so,
that's a Very Bad Idea....
--

John W. Vinson [MVP]