Solved

Access update query just stopped working ?

Posted on 2007-03-30
4
293 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
ID: 18821962
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
ID: 18822020
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 - Microsoft MVP, Access and Data Platform) earned 500 total points
ID: 18822030
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
ID: 18862585
So ... decompile did fix this ?

mx
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

789 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