Help - Change Field Value in different table based on field selection in a form/query (1 Viewer)

cheekybuddha

AWF VIP
Local time
Today, 09:59
Joined
Jul 21, 2014
Messages
2,280
You don't need the WIP field in table WorkRequests_tbl at all. You are just storing redundant calculated data.

In table EngineerWO_tbl you have fields:

EngStartTimeDate
EngEndTimeDate
EngDateStart
EngDateEnd

I'm not sure of the difference between these different start and end dates/times, but they should indicate whether the related WorkRequest is:
Not yet started: EngDateStart IS NULL
WIP: EngDateStart IS NOT NULL AND EngDateEnd IS NULL
Completed: EngDateEnd IS NOT NULL
 

vicsalt

Registered User.
Local time
Today, 09:59
Joined
Aug 22, 2008
Messages
48
Sorted ! 2 issues
1. The Name of the fielsd was "ID" not "WOID" which is the control source
2. The Code ponted to the table "WorkRequest_tbl" it sould have been "WorksRequests"

Thankyou all for your assistance I have spent a very long time , with your help the problem is solved

1696858771318.png
 

vicsalt

Registered User.
Local time
Today, 09:59
Joined
Aug 22, 2008
Messages
48
All sorted thank you all for your patience and solutions. I had a few silly issues
1. the field name on the form was "ID" not "WOID" this was the source name , and a missed "S" in the code, "requests" not "request"

Thankyou again and special thanks to GaP42 for the solution
 

GaP42

Active member
Local time
Today, 18:59
Joined
Apr 27, 2020
Messages
338
Thanks @vicsalt - while your immediate issue is resolved you may find there are further fairly easy steps to take to improve and make your application more robust as you develop Access database skills. @cheekybuddha has indicated an issue. You may flag a WorkRequest record with the status as WIP, however it is redundant as whether the WorkRequest is progress can be derived without reference to a WIP flag using the rules described by cheekyBuddha.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 04:59
Joined
Feb 19, 2002
Messages
43,275
missed "S" in the code, "requests" not "request"
Make sure you have Option Explicit as the second line of EVERY code module. And always compile and save before running any changed code.
 

Users who are viewing this thread

Top Bottom