Run-time Error '3011' - Converts '.' --> '#'

G

gnieberg

Hi,

I am designing a form that allows the user to select a number of tables
in the database and then export them to a tab delimted text file.

The VBA code runs a query that creates a Table who's records are the
names of all of the other tables in the database. This Table is used
to generate the list of available tables to export.

My code seem to be correct except it gets hung up every time after the
first table...the part in the code where it gets an error is:

Do While Not rst.EOF
If rst![Name] <> "Table_List" Then
table_name = rst![Name]
file_name = save_loc & table_name & ".txt"
--> DoCmd.TransferText acExportDelim, "expt_tab_spec",
table_name, file_name, -1
table_name = ""
file_name = ""
End If
rst.MoveNext
Loop

The error says it can't find table -- 'table_name_A#txt' --> basically
it is converting the period '.' to a pound sign "#".... but I have no
idea why or how...

When I step through the program all of the variables have the right
name and form...it is somewhere in the Do.Cmd.TransferText step that it
is getting corrupted.

Any ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top