If FAIL then update FAIL. (1 Viewer)

Mark_

Longboard on the internet
Local time
Today, 05:31
Joined
Sep 12, 2017
Messages
2,111
OK, this may be a strange question but why do you have a summary value that is dependent on multiple records stored in EACH record?

To me, this should either be calculated at run time and not stored OR stored in a different table. Use DLookup to find a fail. Use NZ to return Pass if your DLookup doesn't find anything. Shouldn't need to have it stored.
 

Onlylonely

Registered User.
Local time
Today, 20:31
Joined
Jan 18, 2017
Messages
43
I can't imagine why this is all being done in code rather than the form being bound, but that's just me.

I've been stepping through, and from what I can see it works but somewhere along the line, you undo it. Put a break on your code and step through with the table open. When the Summary field is updated a few times, go back to the table (leave the code window in a halted state) and click Refresh All and see that the Summary field has been set to False for as many times as you've allowed the sql to run. Then I continued stepping through, inquiring what the sql was in the immediate window. I see that these two are executed in 2 different places for some reason
Code:
Update Issuetbl Set [Issuetbl].[Summary] = 'Fail'  WHERE [Issuetbl].[Serial_Number] = '7789' and [Issuetbl].[Step]='2'
Update Issuetbl Set [Issuetbl].[Summary] = 'Fail'  WHERE [Issuetbl].[Serial_Number] = '7789' and [Issuetbl].[Step] ='1'
At some point, I went back to the table and found that several summary fields had been set back to Pass. What I'm saying is that it works, then it all gets undone. Unfortunately I didn't catch where so I leave that up to you.

Really, why don't you just bind the form to the table, and the frames to the fields??
EDIT - never mind for now. I think that's because you've put a frame for every record on a single record form rather than have a continuous subform.

Hi Micron,

I've solved the summary issue by changing the steps.
Do you have any idea to increase the "Rework" as below?
 

Attachments

  • table.JPG
    table.JPG
    32 KB · Views: 81

Micron

AWF VIP
Local time
Today, 08:31
Joined
Oct 20, 2018
Messages
3,478
This looks like another roadblock because you're form isn't bound to anything. Maybe someone else will come up with an idea because I don't have one beyond removing that roadblock.
 

Onlylonely

Registered User.
Local time
Today, 20:31
Joined
Jan 18, 2017
Messages
43
This looks like another roadblock because you're form isn't bound to anything. Maybe someone else will come up with an idea because I don't have one beyond removing that roadblock.

Alright, thank you very much Micron! Appreciate your help on this.
 

Users who are viewing this thread

Top Bottom