Results 1 to 12 of 12
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Microsoft Access has encountered a problem? (Microsoft Access 2002 (10.430

    I have the following command behind Print button on a form and it is giving me the following message:

    Microsoft Access has encountered a problem and needs to close.
    We are sorry to the inconvenience

    <pre>DoCmd.OutputTo acOutputReport, strDocName, acFormatTXT, _
    strOutput, False
    </pre>


    The above command works OK on my development computer a2k (9.0.6926) SP-3 Jet 4.0 SP-8

    Any suggestions?

    Thanks, John

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

    Re: Microsoft Access has encountered a problem? (Microsoft Access 2002 (10

    What is the value of strOutput?

    (The code works OK for me in Access 2002 if I substitute appropriate values for strDocName and strOutput)

  3. #3
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Microsoft Access has encountered a problem? (Microsoft Access 2002 (10

    strOutput = strCurrentBackendDBPath & _
    "R" & _
    cfpadvalue(Me.lngRevTranID, "0", True, 7) & _
    ".txt"

    It works OK for me with Access 2000

    John

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

    Re: Microsoft Access has encountered a problem? (Microsoft Access 2002 (10

    I thought that perhaps you had used a non-standard extension, but .txt is perfectly normal. I see no reason why this should occur.

    Is the problem reproducible? I.e. does it still happen after a compact and repair? And after restarting the PC? Does it happen with the same database on another PC with Access 2002?

  5. #5
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Microsoft Access has encountered a problem? (Microsoft Access 2002 (10

    What does strOutput contain?

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

    Re: Microsoft Access has encountered a problem? (Microsoft Access 2002 (10

    Just to make sure, single-step through the code and check the contents of strOutput before the OutputTo instruction. The file name should NOT contain any of the characters / : * < > " ? |

    For patt: strOutput specifies the filename to be exported to.

  7. #7
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Microsoft Access has encountered a problem? (Microsoft Access 2002 (10

    Hans, I know that, what I asked was the same as you have asked.

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

    Re: Microsoft Access has encountered a problem? (Microsoft Access 2002 (10

    Sorry, I misunderstood (lazy Sunday effect)

  9. #9
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Microsoft Access has encountered a problem? (Microsoft Access 2002 (10

    Maybe it's my English, that was not my strong suit at school or now for that matter.

    Sorry if I sounded harsh.

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

    Re: Microsoft Access has encountered a problem? (Microsoft Access 2002 (10

    It's OK, you didn't sound harsh, you were right to point it out. I hadn't had enough coffee yet when I posted that remark. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

  11. #11
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Microsoft Access has encountered a problem? (Microsoft Access 2002 (10

    So that's your secret, COFFEE.

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

    Re: Microsoft Access has encountered a problem? (Microsoft Access 2002 (10

    Oh dear, now you know <img src=/S/coffeetime.gif border=0 alt=coffeetime width=32 height=48>

Posting Permissions

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