* I have 02 tables: [tblLotSys] and [tblLocationList]
[tblLotSys] has 03 fields: [LotSerialNo] ; [ReceiptDate] ; [Location]
[tblLocationList] has 02 fields: [Location] ; [VacancyStatus]
the [tblLotSys]![Location] looks up value from the [tblLocationList]![Location]
* Here is the actual data:
[tblLotSys]
[LotSerialNo] ; [ReceiptDate] ; [Location]
08C23-001 ; 23/08/2023 ; M-1-1-1
08C23-002 ; 20/07/2023 ; M-1-1-2
08C23-003 ; 15/09/2023 ; M-1-1-4
[tblLocationList]
[Location] ; [VacancyStatus]
M-1-1-1 ; False
M-1-1-2 ; False
M-1-1-3 True
M-1-1-4 ; False
* I need to update each record of the field [tblLocationList]![VacancyStatus] to be "False" for each time the value from the field [tblLocationList]![Location] of that same record has been picked/used by a [tblLotSys]![Location] record.
* For example, if I change the Location of LotSerial 08C23-003 from M-1-1-4 to M-1-1-3 ; how could I automatically update the VacancyStatus of M-1-1-4 back to True, while M-1-1-3 to False?
^^ I have tried setting the field [tblLocationList]![VacancyStatus] to be a calculated field, then I tried to use the dlookup/dcount function inside the Expression Builder to count if there is any value in the [tblLotSys]![Location] matching with [tblLocationList]![Location]. It has not been going anywhere. I don't know how to build the syntax. Could anyone please help?
[tblLotSys] has 03 fields: [LotSerialNo] ; [ReceiptDate] ; [Location]
[tblLocationList] has 02 fields: [Location] ; [VacancyStatus]
the [tblLotSys]![Location] looks up value from the [tblLocationList]![Location]
* Here is the actual data:
[tblLotSys]
[LotSerialNo] ; [ReceiptDate] ; [Location]
08C23-001 ; 23/08/2023 ; M-1-1-1
08C23-002 ; 20/07/2023 ; M-1-1-2
08C23-003 ; 15/09/2023 ; M-1-1-4
[tblLocationList]
[Location] ; [VacancyStatus]
M-1-1-1 ; False
M-1-1-2 ; False
M-1-1-3 True
M-1-1-4 ; False
* I need to update each record of the field [tblLocationList]![VacancyStatus] to be "False" for each time the value from the field [tblLocationList]![Location] of that same record has been picked/used by a [tblLotSys]![Location] record.
* For example, if I change the Location of LotSerial 08C23-003 from M-1-1-4 to M-1-1-3 ; how could I automatically update the VacancyStatus of M-1-1-4 back to True, while M-1-1-3 to False?
^^ I have tried setting the field [tblLocationList]![VacancyStatus] to be a calculated field, then I tried to use the dlookup/dcount function inside the Expression Builder to count if there is any value in the [tblLotSys]![Location] matching with [tblLocationList]![Location]. It has not been going anywhere. I don't know how to build the syntax. Could anyone please help?