Code Failure

  • Thread starter mattc66 via AccessMonster.com
  • Start date
M

mattc66 via AccessMonster.com

I have been using the below code for years. Now all of the sudden I am
getting an error message when I try and execute.

Run-Time error '3011':
The Microsoft Jet database engine could not find the object 'STOCKU.ASC'.
Make sure the object exists and that you spell its name and the path name
correctly.

The STOCKU.ASC is the file that is created, so I understand it wouldn't find
it until it is created. Not sure why this is not working and it was working
fine until now. Anyone have an idea what it could be?

Private Sub CreateInmassFile_Click()

DoCmd.TransferText acExportDelim, "StockupExp", "qryStockupASC", "w:\
STOCKU.ASC", no

End Sub
 
S

Stuart McCall

mattc66 via AccessMonster.com said:
I have been using the below code for years. Now all of the sudden I am
getting an error message when I try and execute.

Run-Time error '3011':
The Microsoft Jet database engine could not find the object 'STOCKU.ASC'.
Make sure the object exists and that you spell its name and the path name
correctly.

The STOCKU.ASC is the file that is created, so I understand it wouldn't
find
it until it is created. Not sure why this is not working and it was
working
fine until now. Anyone have an idea what it could be?

Private Sub CreateInmassFile_Click()

DoCmd.TransferText acExportDelim, "StockupExp", "qryStockupASC",
"w:\
STOCKU.ASC", no

End Sub

The fifth parameter (HasFieldNames) takes True or False, not 'no'.

Also, are you sure you have a valid drive W:?
 
M

mattc66 via AccessMonster.com

Turned out to be an invalid feild name in the query.

Stuart said:
I have been using the below code for years. Now all of the sudden I am
getting an error message when I try and execute.
[quoted text clipped - 17 lines]

The fifth parameter (HasFieldNames) takes True or False, not 'no'.

Also, are you sure you have a valid drive W:?
 

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