Solved

Access update query just stopped working ?

Posted on 2007-03-30
4
290 Views
Last Modified: 2008-02-01
Experts,
I have been working on an ms access application for about 3 years, and all of a sudden, one of the first update statements that I created about 2 years ago just starting hanging, and I can't figure out why.  Please see the query below:

UPDATE mjm_attend_pay_indiv AS z SET z.deposit_flg = -1
WHERE z.row_id in
(
SELECT API.ROW_ID
FROM
MJM_SCHOOL AS S, MJM_CLASS AS C, MJM_STUDENT AS ST, MJM_ATTEND_PAY_INDIV AS API, qry_Deposit_Slip_Total_Num AS TN, qry_Deposit_Slip_Amount AS A
WHERE
S.ROW_ID=C.SCHOOL_ID And
C.ROW_ID=ST.CLASS_ID And
ST.ROW_ID=API.STUDENT_ID And
S.ROW_ID=TN.ROW_ID And
S.ROW_ID=A.ROW_ID And
ST.ACTIVE_FLG=-1 And
API.PAID_FLG=-1 And API.DEPOSIT_FLG=0

pulled apart the update statement.  The subquery works properly and returns 35 rows, and if I take out the subquery and hardcode values the update works.  It just doesn't work together.  Why would that be?  Why would something that hasn't been updated in years, just start hanging?  It doesn't error, it doesn't do anything, it just hangs eternally.  Is there anything else that I can do, or try.  I tried changing around the query, but I have a feeling it is something else.  In the past I had an issue, and it turned out to be a random module that was causing a problem.  I delete all of modules, and that didn't help this time.

Any sugestions would be much appreciated.

Thanks,
Mike
0
Comment
Question by:uconnfb13
  • 3
4 Comments
 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
I assume the missing right paren after _FLG=0  is just a cut and paste error?

"and it turned out to be a random module that was causing a problem"

What exactly do you mean by that?

Any change you have any **missing References ?

mx

0
 

Author Comment

by:uconnfb13
Comment Utility
Yes, the ")" was just a cut and paste error.  I have been calling this update query for about 2 years, and all of a sudden the query just started hanging.

What I meant about the module was that.  In the past I had a random issue with a query that was throwing an error, and the problem turned out to be a completely unrelated module that I created, that was just causing an issue.  It doesn't make sense to me why that would happen, but I thought I would throw that in there also.
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) earned 500 total points
Comment Utility
Do you have any **missing References ?

If not, then >>>

For fun, try a **DeCompile** is on order ... with your modules in

Follow this procedure:

1) Compact and Repair
2) Execute the Decompile >> you database will reopen
3) Close the mdb
4) Open the mdb ... and then do a Compile.
5) Close
6) Compact and Repair one more time

Try this and see what happens

Here are sample 'links'.  Adjust your paths and file names accordingly:

Run this from Start>>Run.

"C:\Program Files\Microsoft Office\Office\Msaccess.exe" /decompile C:\Access2000Clients\GoldstandtSma\App\SmaApp2K.mdb


"C:\Program Files\Microsoft Office\Office\Msaccess.exe" /decompile C:\Access80Clients\GoldstandtPdm\App\PdmAppl8.mdb

"C:\Program Files\Microsoft Office\Office\Msaccess.exe" /decompile C:\Access80Clients\GoldstandtSma\App\SmaAppl8.mdb

"C:\Program Files\Microsoft Office\Office\Msaccess.exe" /decompile C:\Access80Clients\HMC\App\AimAppl8.mdb

"C:\Program Files\Microsoft Office\Office\Msaccess.exe" /decompile "C:\Program Files\Microsoft Office\Office\AdiSML80.mda"



mx
0
 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
So ... decompile did fix this ?

mx
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Suggested Solutions

Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now