Set ADOX Table from Variable Name

jaydwest

JayW
Local time
Today, 10:35
Joined
Apr 22, 2003
Messages
340
I need to set an ADO table based on a variable Name as shown below

Set tbl = cat.Tables(strTableName)

it works fine when I use a quoted string, as shown below.

Set tbl = cat.Tables("MyTableName")

This is different from other collections where these two alternatives are equivalent.

Is there a way to do this with the string Variable?

Thanks for your help and great wisdom.

:rolleyes:
 

Users who are viewing this thread

Back
Top Bottom