Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2003
    Posts
    2

    Thumbs down Unanswered: Access 2002 quits unexpectedly on openreport

    I have a problem with Access 2002 (on fully patched XP Pro) where opening report via code below sometimes causes Access to quit directly without any warning or error messages. Nothing written to event log.

    Code as below;

    Dim stDocName As String
    Dim stLinkCriteria As String
    stDocName = "rptWorkLam"
    stLinkCriteria = "([boats.MouldNo] = " & Chr(39) & Me!txtMouldNo & Chr(39) & ") AND ([invcategoryname] = " & Chr(39) & Me!txtInvCatName & Chr(39) & ")"
    DoCmd.OpenReport stDocName, acViewPreview, , stLinkCriteria

    Code has been utilised sucessfully for some months on various machines and has suddenly started failing on this openreport command - it is the where condition causing it, as the report happily and reliably opens without the where string or with one or other of the criteria, but not both together when failing. Have tried many combinations of the where string - a msgbox showing the string always has the correct data for the where string. I successfully use this type of string elsewhere without intermittent failure.

    Openreport failure is not reliably evident on all machines using this front-end application to back-end dataset. Failure seems to be unreliable - one day a particular machine will extract the report correctly, the next Access will quit unexpectedly on running this report. A standalone machine exhibits same symptoms when failing as a production networked machine.

    Have compacted and repaired to no avail. Have also created new front-end mdb and imported from old front-end and then relinked to tables in back-end dataset in attempt to raise/clear issues. Even setting break on all errors does not raise an error dialog or trip my error handling routines - it just quits Access immediately and directly to the desktop.

    Am going to import backend dataset to new 2002 mdb and see if there are any issues there. Have currently changed code for production front-end to utilise one criteria only.

    Does anyone on the forum have suggestions for a way forward?

    Have a nice day!

  2. #2
    Join Date
    Aug 2003
    Location
    Bosnia & Hercegovina
    Posts
    57
    I was thinking of network application that is used by several people, but you say that same thing happens with stand alone one.....

    could report produce too much data, and maybe crash when more programs are open on a computer?

    check your back-end database format, I had some problems when I used 97/2000/XP different combination of front/back end, but I don't remember if it simply crashed....

  3. #3
    Join Date
    Aug 2003
    Posts
    2
    Thanks for reply Strucnjak.

    Yes, does fail on standlone - even with front and back ends at same version of db (XP Pro, Access 2002) in newly created mdb's. No other programs running. Really odd.

    Data is happily extracted for report with no where condition or with one or the other of the two conditions, so data volume does not appear to be an issue. Only becomes unreliable and fails when the two conditions are applied together.

  4. #4
    Join Date
    Aug 2003
    Location
    Bosnia & Hercegovina
    Posts
    57
    I don't recall such situation, but I would look at data that goes into where statments....

    good luck

Posting Permissions

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