BEX Error (1 Viewer)

Zaff

New member
Local time
Today, 21:34
Joined
Jun 6, 2012
Messages
6
Hello

I have MS Access Work Management Program, this is a Client (MS Access 2010) Server (SQL 2012 Express - hosted on Windows 2012 Standards Server) solution. being in use for 3 years successfully.

There are 10 users using this application, users are connected to the sever via Remote Desktop Connection, and carryout their day-to-day activities.

The Work Orders are issued as per following:
1- Run the Run-sheet report and output it pdf file and save it in temp folder
2- Run the individual Work Order Reports (as listed in the Runsheet) and output each report to PDF, and save it in the temp folder
3- Merge the all the WO pdf files into the Runsheet
4- Attach the merged PDF file to an email and send it to the work crew
5- Clean up temp folder

All was working well, until Tuesday 08-04-2014, all users when trying to issue the work orders (following the automated process above) it came up with Error saying: "Microsoft Access has stopped working" and gives options to check on line (which finds nothing), restart, or debug.

the details of the error message is:
=====

Problem signature:
Problem Event Name: BEX
Application Name: MSACCESS.EXE
Application Version: 14.0.7104.5000
Application Timestamp: 51ce12f7
Fault Module Name: MSVCR90.dll
Fault Module Version: 9.0.30729.6871
Fault Module Timestamp: 4fee6073
Exception Offset: 0006ccd5
Exception Code: c0000417
Exception Data: 00000000
OS Version: 6.2.9200.2.0.0.272.7
Locale ID: 3081
======

Steps performed:
1- There is no modifications/updates/deletion happened on the Windows Server 2012
2- The Same function that produces WO package, it produces the Invoicing Package (Statement, and Invoices), and this is working properly :banghead:
3- I copied the application to Windows 8 machine it worked properly.

The system is failing on the following line:
DoCmd.OpenReport stDoc, acViewPreview, , stLink, acHidden
Reports!rpt_WO.Visible = False
DoCmd.OutputTo acOutputReport, stDoc, acFormatPDF, stFileName, False
DoCmd.Close acReport, stDoc

4- i have checked the DEP setting and created excluded office 2010.


All the above did not resolve the issue .... Please Help,.....?????
 

JHB

Have been here a while
Local time
Today, 11:34
Joined
Jun 17, 2012
Messages
7,720
Where is the report output to, the value of stFileName?
Only for testing purpose:

  1. Comment out the line to see if the code runs without error.
  2. Check if the name and path in the stFileName variable is valid and if user has write permission to the path, (if you leave the argument blank, Access prompts you for an output file name).
 

Zaff

New member
Local time
Today, 21:34
Joined
Jun 6, 2012
Messages
6
Thanks JHB for your efforts,
1. The stFileName is populated with a full path name, folders\filename.pdf which was working before 8-4-2014
2. I have created a new access application and imported everything to it, after I relinked the tables and still the same results, the error appears in creating wo package, but not with the invoice package
3. User granted full control on the temp folder

Funny enough I saw this error reported on Microsoft for almost 2 years but without any resolution :confused:
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 10:34
Joined
Sep 12, 2006
Messages
14,265
occasionally you get bugs of this sort which shouldn't happen.

try compact and repair of both front end and back end. if necessary, try importing everything into a new clean database

I had a dbs that did what you describe on certain functions when used as an mdb but worked correctly as a mde. Go figure. Never got that sorted.


wrt your exact issue, I had similar issues generating pdfs. From what I recall, underscores in file names caused intermittent problems, so I replaced them with hyphens. I also think i replaced the constant acformatpdf with its text value (it is text rather than numeric for some reason). Maybe that would help.
 
Last edited:

JHB

Have been here a while
Local time
Today, 11:34
Joined
Jun 17, 2012
Messages
7,720
2. I have created a new access application and imported everything to it, after I relinked the tables and still the same results, the error appears in creating wo package, but not with the invoice package
What is the different between the two package?
Did you try to comment out the problem line.
Put in a hard coded line instead of the stFileName value.
Maybe create a dummy report and use that in the report name parameter.
I know you say it has worked before and the code hasn't change, therefore I'm "looking" for things happen outside the code, like permissions, values in variable etc.
Could the report have been open in design view so something got change/got saved by accident?
Can you open the report manually?
 
Last edited:

Zaff

New member
Local time
Today, 21:34
Joined
Jun 6, 2012
Messages
6
1- I did use the hard code for the report name -- it failed,
2- there is no special characters in the filename
3- Permissions are same, and no changes in the environment...
4- Some time even the report itself you cannot open it when you are on the server (RDC) but on the Windows 8 i can open it anytime.
5- i have noticed that the WO Package works when it has one or two WO but it fails with 3 and over.

"Some Happen outside the Code"
you are right that seems to be what i am suspecting... because i have done the following:
1- I've moved the FE application to Windows 8, it did work (expect if failed on the merge function due to the fact that StrStorage.dll has some issues with the Win8).
2- On Tuesday 8-4-2014 there was no Windows Update on our Server
3- On Tuesday 8-4-2014 Heartbleed Virus did NOT affect our system (or that what seems to be, there is no impact, and AVG did neither report nor detect and impact)
4- SQL Express showed everything is working properly, and the application as well it worked on different environment (win8). therefore I have planned to restore the Sever form the Backup taken on 05-04-2014 (probably that will fix it ...)
 

Zaff

New member
Local time
Today, 21:34
Joined
Jun 6, 2012
Messages
6
Further Update,

Reviewing the Error Handler log (the Application writes the Errors into two places a. internally in the Error Table, and b. externally into a text file) i found that one of the variables in the program which was integer caused an overflow error "Run-time Error 6", one of the team had changed this variable to Long, and release the program again, this happened on Tuesday 04-08-2014.

I do not know whether this had any impact, or contributed to the problem, but i thought i share this as well.
 

JHB

Have been here a while
Local time
Today, 11:34
Joined
Jun 17, 2012
Messages
7,720
... one of the team had changed this variable to Long, and release the program again, this happened on Tuesday 04-08-2014.
It was so anyway made ​​changes to the program! :rolleyes:
Put in some breakpoint in the program on relevant places, for stepping through the code to find out which impact the change has made.
 

Zaff

New member
Local time
Today, 21:34
Joined
Jun 6, 2012
Messages
6
I have extracted a version of the Application from the server backup dated to 05-04-2014 (3 days prior first problem of BEX occurred).

I ran the WO Packaging function and i have found that actually the application stops when trying to open the Work Order Report itself as identified from the debugger.

Than i have tried to open the report (that caused the system to freeze) from another form WO Centre, and directly, and i faced the same problem the application generated BEX Error.

The WO has 3 sub-reports -display the WO Materials -that belong to the 4 Work Types one work type does not show any sub-report (instruction only), therefore the Application show only the sub-report that related to the WO Type using the Report_onLoad event. (i.e. WO#67003 Type Install failed here)

I made 4 copies of the WO original reports ONE for each work type, and treid it was opening better, but still failed on some other WO with different WO Type (WO#67003 opened successfully here, but WO#67004 Install, and 67035 Type: Dismantle failed here)

then i have removed the Materials sup-reports from all the new copies and run reports NO report showed any problem, even the when i run the Work Order Packaging functions it worked perfectly.


There 2 issues here:
1- What caused this BEX to take place
2- there is obviously a problem between the Material sup-report and WO report

Two exhausting long nights led to identify the error area, but not the cause of the error?
 

Zaff

New member
Local time
Today, 21:34
Joined
Jun 6, 2012
Messages
6
I found the problem, it was in the report-sub report links, although i have resolve the data type in the both tables to Integer, but strangely enough, the reports problem did not resolve, therefore i have:
1- Updated the data type in the SQL server
2- Created a new database
3- Imported all Objects to it (except the problematic reports, and function)
4- Re-developed both the report and its sub-report in the new DB
5- Re-write the function again in the DB.

then it worked :)

I would like to thank JHB, and gemma-the-husky for their special contribution and assistance

Zaff
 
Last edited:

Users who are viewing this thread

Top Bottom