Sometimes Ok, but sometimes Fail.

T

Ted

I am new to generate a report. I use a Form and VBA code to fill up a Table
which is the record source of the report.

Sometimes I click the button of the Form to fill up Table for generating a
report, the report is Ok. But sometimes it is Fail and popup the error
message as below:

Error signature
AppName:msaccess.exe AppVer:8.0.0.5903 ModName:gdi32.dll
ModVer: 5.1.2600.3159 Offset: 0000d3d5

I have already searched Office Forum and Google, but I still can not fix it.
I wish the user click the button, the report always is OK!

Please give me advices. Thanks in advance.
 
A

Allen Browne

One of the things that can make Access crash is if fields disappear or
change data type, so we need to hear a bit more about how you assign the
fields for this report.

Presumably your report is bound to a temporary table, and in your form you
run an Append query to add data to the table, and then OpenReport. Or do you
delete the table (if it already exists), and run a Make Table query?

Can you post the code that populates the table?

Also indicate what version of Windows you are running, and what graphics
card you are using, and what printer. GDI32 handles the display information.
Access uses the printer driver to calculate the metrics for the report
layout.

I don't suppose the difference between when it work and when it doesn't is
which printer you have a default?
 
T

Ted

Dear Allen,

Thank you for your information.
From your reply, I have really got concepts about the close relationship of
Access, Windows version, printer driver and graphic card.

About my question detail are as below:
1. I have a permanent table for the report. This table will be clear by VBA
which belongs to the Form with "DELETE * FROM
" and then fill
up with "INSERT INTO
SELECT ... FROM [query] WHERE ((Date1) between
Cdate(Format([Forms]![frmParameterWildcard]![txtFrom],"mm/dd/yyyy")) and
Cdate(Format([Forms]![frmParameterWildcard]![txtTo],"mm/dd/yyyy"))) AND
((Title) Like "*" & [Forms]![frmParameterWildcard]![txtCriteria] & "*") AND
((Location) Like IIf([Forms]![frmParameterWildcard]![CheckGood1],"*day*","")
Or ((Location) Like
IIf([Forms]![frmParameterWildcard]![CheckGood2],"*afternoon*",""))))". Then
Open a report which has report source assigned this permanent table.
p.s.
This [query] indicates a normal permanent query without any criteria in
database.
Date1, Title, Location are Table's fields.
Data flow: [permanent query]->select from+where(using VBA in Form for user
entry)->[permanent table]->report (with changing page layout setting for
printer to transverse)

2. The PC in office uses Windows XP and Access 97. As well, Access 2000
runtime version and Access 2002 runtime version both are already installed in
the same PC.
Would you kindly like to tell me how to get the graphics card's name as I do
not have authorization to open the PC case? (I am a small person)
Recently, company changed the printer driver for all staff. I will figure
out the default printer's name.

3. I try to redesign the similar data flow to simulate the problem from
office at home. But it always ok. Yes, it should be always OK. As well, I
reduce table in the data flow and make it efficiently, I hope my PC in office
is the same as the PC at home. I use Windows XP and Access 2003 at home.
p.s.
The similar same data flow: [permanent query]+where(using criteria with
parameters from Form's textbox)->report (with changing page layout setting
for printer to transverse)
Version different:
(PC1) Windows XP and Access 97. As well, Access 2000 runtime version and
Access 2002 runtime version.
(PC2) Windows XP and Access 2003

Thank you for your attention to this matter.
I am looking forward to hearing from you in near future

Best Regards

Ted
 
A

Allen Browne

Replies in-line

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Ted said:
Dear Allen,

Thank you for your information.
From your reply, I have really got concepts about the close relationship
of
Access, Windows version, printer driver and graphic card.

About my question detail are as below:
1. I have a permanent table for the report. This table will be clear by
VBA
which belongs to the Form with "DELETE * FROM
" and then fill
up with "INSERT INTO
SELECT ... FROM [query] WHERE ((Date1)
between
Cdate(Format([Forms]![frmParameterWildcard]![txtFrom],"mm/dd/yyyy")) and
Cdate(Format([Forms]![frmParameterWildcard]![txtTo],"mm/dd/yyyy"))) AND
((Title) Like "*" & [Forms]![frmParameterWildcard]![txtCriteria] & "*")
AND
((Location) Like
IIf([Forms]![frmParameterWildcard]![CheckGood1],"*day*","")
Or ((Location) Like
IIf([Forms]![frmParameterWildcard]![CheckGood2],"*afternoon*",""))))".
Then
Open a report which has report source assigned this permanent table.
p.s.
This [query] indicates a normal permanent query without any criteria in
database.
Date1, Title, Location are Table's fields.
Data flow: [permanent query]->select from+where(using VBA in Form for user
entry)->[permanent table]->report (with changing page layout setting for
printer to transverse)


Okay: the DELETE followed by INSERT is much better than a Make Table query.
You have already defined the fields, so they can't change data type. This is
all good.

It does look like this query statement draws from another query.
2. The PC in office uses Windows XP and Access 97. As well, Access 2000
runtime version and Access 2002 runtime version both are already installed
in
the same PC.
Would you kindly like to tell me how to get the graphics card's name as I
do
not have authorization to open the PC case? (I am a small person)
Recently, company changed the printer driver for all staff. I will figure
out the default printer's name.

Right-click the My Computer icon (or go to System in Control Panel.)
One of the tabs has a Device Manager button.
The graphics card is shown there.

Alternatively, right-click the desktop, and choose Properties.
Under Display Settings, the Advanced button gives you driver details too.
3. I try to redesign the similar data flow to simulate the problem from
office at home. But it always ok. Yes, it should be always OK. As well, I
reduce table in the data flow and make it efficiently, I hope my PC in
office
is the same as the PC at home. I use Windows XP and Access 2003 at home.
p.s.
The similar same data flow: [permanent query]+where(using criteria with
parameters from Form's textbox)->report (with changing page layout setting
for printer to transverse)
Version different:
(PC1) Windows XP and Access 97. As well, Access 2000 runtime version and
Access 2002 runtime version.
(PC2) Windows XP and Access 2003

It is interesting that it is specific to one computer setup.
Re-affirms the possibility that it is a bad printer driver.

You might try changing the default printer to a completely different one.
If that makes a difference, the printer driver becomes the main suspect.
Especially if they changed it recently, and the problem started recently.
 
T

Ted

Dear Allen,

Thank you for your information.
In accordance with your advice, I fixed the problem.

Fixing the problem details are as below:
My default printer was Canon printer. There was still the same problem in my
report. I tried to change default printer to HP printer. It is always OK! I
am very happy that it is stable and its result is the same as simulation at
home. Then, I tried to set default printer back to Canon printer. It is
always OK now! It is miracle! Furthermore, I found I had other reports which
were the copies of the report had the same problem, but still can not be
solves. Then I killed all of them.
I keep the only one correct report for further developing.

Thank you for your attention to this matter.

Best Regards,

Teddy

Allen Browne said:
Replies in-line

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Ted said:
Dear Allen,

Thank you for your information.
From your reply, I have really got concepts about the close relationship
of
Access, Windows version, printer driver and graphic card.

About my question detail are as below:
1. I have a permanent table for the report. This table will be clear by
VBA
which belongs to the Form with "DELETE * FROM
" and then fill
up with "INSERT INTO
SELECT ... FROM [query] WHERE ((Date1)
between
Cdate(Format([Forms]![frmParameterWildcard]![txtFrom],"mm/dd/yyyy")) and
Cdate(Format([Forms]![frmParameterWildcard]![txtTo],"mm/dd/yyyy"))) AND
((Title) Like "*" & [Forms]![frmParameterWildcard]![txtCriteria] & "*")
AND
((Location) Like
IIf([Forms]![frmParameterWildcard]![CheckGood1],"*day*","")
Or ((Location) Like
IIf([Forms]![frmParameterWildcard]![CheckGood2],"*afternoon*",""))))".
Then
Open a report which has report source assigned this permanent table.
p.s.
This [query] indicates a normal permanent query without any criteria in
database.
Date1, Title, Location are Table's fields.
Data flow: [permanent query]->select from+where(using VBA in Form for user
entry)->[permanent table]->report (with changing page layout setting for
printer to transverse)


Okay: the DELETE followed by INSERT is much better than a Make Table query.
You have already defined the fields, so they can't change data type. This is
all good.

It does look like this query statement draws from another query.
2. The PC in office uses Windows XP and Access 97. As well, Access 2000
runtime version and Access 2002 runtime version both are already installed
in
the same PC.
Would you kindly like to tell me how to get the graphics card's name as I
do
not have authorization to open the PC case? (I am a small person)
Recently, company changed the printer driver for all staff. I will figure
out the default printer's name.

Right-click the My Computer icon (or go to System in Control Panel.)
One of the tabs has a Device Manager button.
The graphics card is shown there.

Alternatively, right-click the desktop, and choose Properties.
Under Display Settings, the Advanced button gives you driver details too.
3. I try to redesign the similar data flow to simulate the problem from
office at home. But it always ok. Yes, it should be always OK. As well, I
reduce table in the data flow and make it efficiently, I hope my PC in
office
is the same as the PC at home. I use Windows XP and Access 2003 at home.
p.s.
The similar same data flow: [permanent query]+where(using criteria with
parameters from Form's textbox)->report (with changing page layout setting
for printer to transverse)
Version different:
(PC1) Windows XP and Access 97. As well, Access 2000 runtime version and
Access 2002 runtime version.
(PC2) Windows XP and Access 2003

It is interesting that it is specific to one computer setup.
Re-affirms the possibility that it is a bad printer driver.

You might try changing the default printer to a completely different one.
If that makes a difference, the printer driver becomes the main suspect.
Especially if they changed it recently, and the problem started recently.
Thank you for your attention to this matter.
I am looking forward to hearing from you in near future
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top