Results 1 to 4 of 4
  1. #1
    Join Date
    May 2003

    Unanswered: SQL Distinct causing Access Crash

    Hi All,

    Im having a bit of a problem with a query Im using. What ive done is link a report to a query, but when i open the report it causes MSACCESS.exe to crash.

    The query Im using is attached. If I remove the DISTINCT keyword the report loads up fine but alot of the data is repeated. Adding DISTINCT back in causes the report to crash...

    Any ideas what Im doing wrong,

    Your help would be greatly appreciated.

    Last edited by JohnnieP; 06-18-03 at 12:28.

  2. #2
    Join Date
    Oct 2002

    Re: SQL Distinct causing Access Crash

    Sometimes queries crash access when there is a null value handled improperly. If you need distinct records, try using a group by clause instead of the distinct keyword.

  3. #3
    Join Date
    Sep 2003
    Try creating a table from your query, and change the recordsource to that table. If the report opens w/o crashing, you can set some code up in the final production version of your db to create the table before the report hits its load event.

    The most likely case is your db is corrupt. It is possible that you don't have enough mem to show a report, but I suspect the former is true.
    All code ADO/ADOX unless otherwise specified.

  4. #4
    Join Date
    May 2003
    Thats great thanks for the ideas....

    The problem seemed to go away after a while (lots of other developments on the database, splitting the queries up a little), which would lead me to thinking something was corrupt.

    Again thanks for your help


Posting Permissions

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