467,877 Members | 1,291 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,877 developers. It's quick & easy.

Trying to figure why my . are turning into a #

256MB
I'm trying to create a .txt file so that I can merge it with a word document
Expand|Select|Wrap|Line Numbers
  1.     vtable = "mailinglabels"
  2.     apppath = "C:\filmsextract"
  3.     appathx = ("" & apppath & "" + "\" + "mailinglabels.txt")
  4.     DoCmd.TransferText acExportMerge, , vtable, appathx, True
  5.  
when the program get to the acExportMerge I get this error "The Microsoft Office Access database engine could not find the object 'mailinglabels#txt'. Make sure the object exists and that you spell its name and the path name correctly." can any one give me any clues and to what's going on.
Jan 19 '21 #1
  • viewed: 1496
Share:
3 Replies
NeoPa
Expert Mod 16PB
My guess is that you only half consider what it is you're doing. You have an idea of the eventual results required but are then confusing it with the first step.

Are you trying to merge into a Word document (as implied by acExportMerge) or are you trying to create a Text file that you may later want to merge with the Word doc?

Documentation on the acExportMerge option is sparse but I'm guessing it is expecting a Word file address as its FileName parameter. It's also expecting this file to exist already, for your data to be merged into it. I doubt either of these is true.

I know that doesn't explain why the '.' is shown in the error message as a '#'. That looks like it's expecting a FileName plus a point within the file - say a bookmark - so it may be treating your "mailinglabels.txt" as File=mailinglabels with a Bookmark specification of "txt". In which case it's going to be mightily confused.

Maybe if the documentation were clearer this could all have been avoided simply.
Jan 20 '21 #2
256MB
Yes, I did notice that the table name "mailinglabels" and the .txt file has the same name. When I changed the .txt name to mailing.txt I didn't get the error. Thanks for you insight into this.
Jan 20 '21 #3
NeoPa
Expert Mod 16PB
Hi Tom.

I'm glad I could help, though I have to admit that wasn't my thinking. If that triggered something in you to check that though - all to the good.

BTW. I assume you set your response as Best Answer by accident, it was certainly not correct to do so, so I've reset it for you. I did consider setting mine but frankly it doesn't qualify either. It only triggered something. It doesn't take a new reader directly to the answer.
Jan 20 '21 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

20 posts views Thread by Brian Kazian | last post: by
7 posts views Thread by Greg Raven | last post: by
7 posts views Thread by Todd Cary | last post: by
1 post views Thread by melanieab | last post: by
reply views Thread by jack112 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.