Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Jet Engine Database (2000)

    I am trying to export a query as a text file (|Microsoft Word Merge Format)

    When I do this to qry1004 i get a message box saying

    Microsoft Jet database engine could not find the object 'qry104.txt'. Make sure the object exists and that you spell its name and the path correctly.'

    I can export it to any other folder except c:Letters

    If I try to fool it and copy it across manually it will not work in the vb code for some reason.

    Another point to mention is that when i am doing this sometimes I get an access error 'I/O error'
    Best Regards,

    Luke

  2. #2
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Jet Engine Database (2000)

    If I rename the querty to qry1005 and export it to a wordmerge txt file it works, no when i try to do the merge form a command button it deletes the text file and says it's not there! I am sure I have been down this route before and no joy.
    Best Regards,

    Luke

  3. #3
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Jet Engine Database (2000)

    Still having no joy getting it to merge with word, the text file just gets deleted and the code says it's not there
    Best Regards,

    Luke

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Jet Engine Database (2000)

    From the lack of reactions, you may conclude that it's hard for others to know what's going on without seeing the database.

  5. #5
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Jet Engine Database (2000)

    Attached is a sample, hope it helps [img]/forums/images/smilies/smile.gif[/img]
    Best Regards,

    Luke

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Jet Engine Database (2000)

    You're looking very different suddenly! <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    Which query should I try to export?

  7. #7
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Jet Engine Database (2000)

    qry1003

    If you select 'single Price' from the drop down box and clikc on 'Valuation Letter' it will explain the problem. But the code is replicated from the two button at the top right hand side for appointment letter and valuation form
    Best Regards,

    Luke

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Jet Engine Database (2000)

    I get an error since I'm not a salesman in your company. Please provide clear instructions.

  9. #9
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Jet Engine Database (2000)

    Sorry
    You need to edit a record in the tblSalesman to reflect your current username login in windows as it uses that to specify the document path for the word docs and txt file paths.
    Best Regards,

    Luke

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Jet Engine Database (2000)

    You don't have a line

    Exit Sub

    immediately above

    NoMergeError:

    so the error handling section is ALWAYS executed. Apart from that, the merge is executed without problems when I try it.

  11. #11
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Jet Engine Database (2000)

    I have added that in now, but still it tells me that qry1003.txt is no there: see the attached screen capture
    Best Regards,

    Luke

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Jet Engine Database (2000)

    Are you sure that tblSalesman contains the correct path (the folder must exist, and the path must end in a backslash)?

  13. #13
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Jet Engine Database (2000)

    I have copied and pasted the exact same code from the top right hand letter button, but changed the references to qry1003, qry1003export and 1003.doc and the text files exist as a wordmerge document in c:letters, but when the button is pressed it still says the same?
    Best Regards,

    Luke

  14. #14
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Jet Engine Database (2000)

    Yes, the path in tblsalesman is c:Letters

    If you use the de######, it finds the right path, but complains that it does not exist when it comes to
    DoCmd.TransferText acExportDelim, , "qry1003Export", strletterpath & strletterfile, True
    Best Regards,

    Luke

  15. #15
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Jet Engine Database (2000)

    I have done nothning else but rename each query to qry1006 and qry1006export and it works now?
    Best Regards,

    Luke

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •