Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to refernce table name from textbox value

Status
Not open for further replies.

Moss100

Technical User
Aug 10, 2004
586
GB
Hello I have a line of code which set the table name to be used as below:

strSQL = "SELECT * FROM [1250]"

That runs fine and returns all I need from table 1250

If however I have a textbox on the form called texttable which contains the value 1250 and change my code to:

strSQL = "SELECT * FROM & Me.[texttable]" it errors.

What is wrong here and what would make things work?

Many thanks Mark

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top