How do i make an update query in order to update all blank fields below with each of the letters above it?
I have below an illustrated sample of what I'm trying to achieve.
(I need to update the left table to become the right table.)
(left)Table1
Letters
A
--
--
--
B
--
--
C
--
--
--
--
(right) Table1
Letters
A
A
A
A
B
B
B
C
C
C
C
C
I've tried this: (but it updates every unpaid dates based on the MAX payment date only.)
And then I've even tried subquery (but it won't allow me to update, it says "Operation must use an updateable query") which is weird because i can open it in select query.
I have below an illustrated sample of what I'm trying to achieve.
(I need to update the left table to become the right table.)
(left)Table1
Letters
A
--
--
--
B
--
--
C
--
--
--
--
(right) Table1
Letters
A
A
A
A
B
B
B
C
C
C
C
C
I've tried this: (but it updates every unpaid dates based on the MAX payment date only.)
Code:
UPDATE tblUnpaidBalances SET tblUnpaidBalances.paydate = DMax("paydate","tblunpaidbalances","Transactionid = " & "transactionid")
WHERE (((tblUnpaidBalances.paydate) Is Null));
And then I've even tried subquery (but it won't allow me to update, it says "Operation must use an updateable query") which is weird because i can open it in select query.
Code:
UPDATE tblUnpaidBalances SET tblUnpaidBalances.paydate = (select max(paydate) from tblunpaidbalances as ub where ub.transactionid = tblunpaidbalances.transactionid)
WHERE (((tblUnpaidBalances.paydate) Is Null));