Excellent...it works, Thanks
"John Spencer" wrote:
> The answer is Yes. Since you posted no details I can only give you a simple
> example.
>
> Dim strSQL as String
> Dim tblName as String
>
> strSQL = "SELECT A.Field1, A.Field2" & _
> " FROM [" & tblName & "] as A INNER JOIN SomeTable"
> " ON A.SomeField = SomeTable.SomeMatchingField"
>
>
>
> John Spencer
> Access MVP 2002-2005, 2007-2010
> The Hilltop Institute
> University of Maryland Baltimore County
>
> ambushsinger wrote:
> > Can I use a variable for a table name in an SQL statement using VBA
> .
>
|