Running Query Crashes Access

J

James McNellis

Hello,

I have a rather serious problem with a query I am trying to execute:

SELECT pbs.pbsId, pbs.pbsName, pbs.pbsPl, pbs.pbsRevisionId,
pbs.revisionName
FROM [SELECT pbsId, pbsName, pbsPl, pbsRevisionId, pbsRevisionName FROM
qPbsItems WHERE pbsRevisionId=5]. AS pbs
WHERE (SELECT COUNT(pbsWbsMap.pbsId) FROM pbsWbsMap, wbsItems WHERE
pbsWbsMap.pbsId=pbs.pbsId AND pbsWbsMap.wbsId=wbsItems.id AND
wbsItems.revisionId=3)=0;

Whenever I run the query, Access crashes with no error message (except the
"Send error report to Microsoft").
The query executes fine if I delete the top-level WHERE clause.

Does anyone have any suggestions? I've been trying to play with this for
the last two hours, and have had no success.

Thank you in advance for helping!

James.
 
R

Roger Carlson

This problem may indicate some corruption in your database. Try creating a
brand new database and import ALL of the objects from the old to the new.
Pay particular attention to the Options button on each of the tabs in the
Import dialog box. Then see if the same thing happens in your new database.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
J

James McNellis

Thanks a lot for the suggestion, but after copying all database objects, the
problem still remains.

Roger Carlson said:
This problem may indicate some corruption in your database. Try creating a
brand new database and import ALL of the objects from the old to the new.
Pay particular attention to the Options button on each of the tabs in the
Import dialog box. Then see if the same thing happens in your new database.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

James McNellis said:
Hello,

I have a rather serious problem with a query I am trying to execute:

SELECT pbs.pbsId, pbs.pbsName, pbs.pbsPl, pbs.pbsRevisionId,
pbs.revisionName
FROM [SELECT pbsId, pbsName, pbsPl, pbsRevisionId, pbsRevisionName FROM
qPbsItems WHERE pbsRevisionId=5]. AS pbs
WHERE (SELECT COUNT(pbsWbsMap.pbsId) FROM pbsWbsMap, wbsItems WHERE
pbsWbsMap.pbsId=pbs.pbsId AND pbsWbsMap.wbsId=wbsItems.id AND
wbsItems.revisionId=3)=0;

Whenever I run the query, Access crashes with no error message (except the
"Send error report to Microsoft").
The query executes fine if I delete the top-level WHERE clause.

Does anyone have any suggestions? I've been trying to play with this for
the last two hours, and have had no success.

Thank you in advance for helping!

James.
 
J

James McNellis

I have rewritten my query as follows:

SELECT pbs.pbsId AS pbsId, pbs.pbsName AS pbsName, pbs.pbsPl AS pbsPl,
pbs.pbsRevisionId AS pbsRevisionId, pbs.pbsRevisionName AS pbsRevisionName
FROM qPbsItems AS pbs
WHERE pbs.pbsRevisionId=5 AND (SELECT COUNT(pbsWbsMap.pbsId) FROM pbsWbsMap,
wbsItems WHERE pbsWbsMap.wbsId=wbsItems.id AND pbsWbsMap.pbsId=pbs.pbsId AND
wbsItems.revisionId=1)=0;

Now it throws no error.

If anyone has any idea why the former query did not work but this query
does, I would appreciate any help.

Thanks again.

James.
 
Joined
Aug 14, 2013
Messages
1
Reaction score
0
Hi,

Any idea why Ms access crashes when I run query on a table? But when I ran it from my thumb drive it worked. When running it from my C:\ MS Access crashes.BTW I ran the query using the default query selection in access(check box in every field)

I would appreciate all your feedback. :bow:
 
Top