Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

messed up report

Status
Not open for further replies.

JoeriMJ

Programmer
Aug 9, 2007
36
0
0
BE
I've had to change a few things in my database layout. An extra field was added to a table and this one field linking to another table has given a lot of extra functionality to the program. Though some of my querys were now messed up. After editing the querys, they seemed to work in query view.

I have a report that before the changes always worked fine. Now when I try to open it, Access shuts down.

this is the full error report created after the error.
Probleemhandtekening:
Gebeurtenisnaam van probleem: APPCRASH
Naam van de toepassing: MSACCESS.EXE
Versie van toepassing: 11.0.5614.0
Tijdstempel van toepassing: 3f3c8e3c
Naam van foutmodule: msjet40.dll
Versie van foutmodule: 4.0.9635.0
Tijdstempel van foutmodule: 450b3682
Uitzonderingscode: c0000005
Uitzonderingsmarge: 0005e527
Versie van besturingssysteem: 6.0.6000.2.0.0.768.3
Landinstelling-id: 2067

Aanvullende informatie over dit probleem:
LCID: 1043
Brand: Office11Crash
skulcid: 1043

Lees onze privacyverklaring:

When i try to go to develop mode for the report, the same error pops up and access shuts down.

Is it maybe for the better that I create a new report from scratch or is this repairable ?



Greetz,
Joeri
 
I just found out it is a query giving the problem. when I execute this query Access stops instantly.
Here is the SQL.

SELECT SELECT_BDL.*, SELECT_assembly.*, SELECT_BDL.assemblyNo
FROM SELECT_BDL, SELECT_assembly
WHERE (((SELECT_BDL.assemblyNo)=[SELECT_assembly].[assemblyNo]))
ORDER BY SELECT_assembly.longItem DESC;


As you can see, SELECT_BDL and SELECT_assembly are two seperate queries, Adjusted to the new table layout and each of them work properly.
Now when I put them together, as needed for the report, it doesn't work.

Any ideas?

Greetz,
Joeri
 
Not sure if its the problem, but in your select you have 'SELECT_BDL.*' and then also 'SELECT_BDL.assemblyNo'.

As you've already selected all fields from SELECT_BDL, you are effectively trying to return the field SELECT_BDL.assemblyNo twice. This isn't a problem if you give the second occurrence an alias, eg 'SELECT SELECT_BDL.*, SELECT_assembly.*, SELECT_BDL.assemblyNo [blue]AS assemblyNo_Number2[/blue]', but without aliasing it might be the cause of the crash.

Just remove 'SELECT_BDL.assemblyNo' from the Select, and see how it goes:

SELECT SELECT_BDL.*, SELECT_assembly.*
FROM SELECT_BDL, SELECT_assembly
WHERE SELECT_BDL.assemblyNo=SELECT_assembly.assemblyNo
ORDER BY SELECT_assembly.longItem DESC;

HTH

Max Hugen
Australia
 
Thanks for your suggestion.
It still doesn't do what it's supposed to do.
Deadline is tomorrow and i'm getting pretty nervous right now.

Greetz,
Joeri
 
Joeri, have you tried saving the query, and then running it from the Database window, rather than via the report? Does it still crash?

Max Hugen
Australia
 
i've found the error. The two query's in SELECT_FULL_BDL used a field from the same table. This obviously isn't possible when joining the two query's.
Thanks for trying to help me

Greetz,
Joeri
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top