You could do it using a foreign key, the trick here is to make both columns (AccountID and Status) Primary in tblAccounts. Then in the transaction table, you create a foreign key to both (AccountID and Status) with cascade on UPDATE/Delete. This means, if you ever change/delete an account id or its status from tblAccounts, the changes will be applied on all foreign keys as well.
Here is an example :
CREATE TABLE tblAccounts(
ID INT,
AccountID INT NOT NULL,
[Status] BIT NOT NULL
)
ALTER TABLE tblAccounts
ADD PRIMARY KEY (AccountID, [Status])
CREATE TABLE tblTransactions(
[ID] INT,
[TransID] INT NOT NULL PRIMARY KEY,
[AcctID] INT NOT NULL,
[Status] BIT NOT NULL
)
ALTER TABLE tblTransactions
ADD FOREIGN KEY (AcctID,[Status]) REFERENCES tblAccounts(AccountID, [Status])
ON UPDATE CASCADE
ON DELETE CASCADE
INSERT INTO tblAccounts (ID, AccountID, [Status])
VALUES
(1,1000,1),
(2,1100,1),
(3,1200,1),
(4,1300,1)
INSERT INTO tblTransactions(ID, TransID, AcctID,[Status])
VALUES
(1,5000,1000,1),
(2,3258,1300,1),
(3,5852,1000,1),
(4,9631,1100,1),
(5,1870,1200,1)
tblAccounts
| ID | AccountID | Status |
|----|-----------|--------|
| 1 | 1000 | true |
| 2 | 1100 | true |
| 3 | 1200 | true |
| 4 | 1300 | true |
tblTransactions
| ID | TransID | AcctID | Status |
|----|---------|--------|--------|
| 1 | 5000 | 1000 | true |
| 2 | 3258 | 1300 | true |
| 3 | 5852 | 1000 | true |
| 4 | 9631 | 1100 | true |
| 5 | 1870 | 1200 | true |
Let's change the status of AccountID 1100 to false
UPDATE tblAccounts
SET
[Status] = 0
WHERE
AccountID = 1100
Check tblAccount
| ID | AccountID | Status |
|----|-----------|--------|
| 1 | 1000 | true |
| 2 | 1100 | false|
| 3 | 1200 | true |
| 4 | 1300 | true |
Check tblTransactions
| ID | TransID | AcctID | Status |
|----|---------|--------|--------|
| 1 | 5000 | 1000 | true |
| 2 | 3258 | 1300 | true |
| 3 | 5852 | 1000 | true |
| 4 | 9631 | 1100 | false|
| 5 | 1870 | 1200 | true |