Forum Discussion
Add Where Clause
- Feb 18, 2022
Hi,
If I understand right then you are looking for:
strSQL = "UPDATE tblPmtProposal " & _
" SET IDBankAcctfk = " & Me!cboCurrency.Column(1) & _
" WHERE ID = " & Me!txtID
Servus
Karl
************
Access News
Access DevCon
"insert into tblPMTProposal (IDBankAcctfk) select " & Me!txtID & ";"
- Tony2021Feb 18, 2022Iron Contributor
Hi Arnel,
thank you.
Yes, I am inserting only 1 field (IDBankAcctfk).
I am inserting Me!cboCurrency.Column(1)
but I need to insert WHERE "[ID]=" & Me.txtIDRight now, without the WHERE condition, its inserting a record in tblPMTProposal but its not according to the where condition.
I think I need to append that WHERE condition to that insert statement somehow.
I hope that it makes sense.
Maybe I am not following.thank you
- Tony2021Feb 18, 2022Iron ContributorMaybe INSERT is not what I need and its UPDATE? Maybe my approach is not correct and need UPDATE.
- Feb 18, 2022
Hi,
If I understand right then you are looking for:
strSQL = "UPDATE tblPmtProposal " & _
" SET IDBankAcctfk = " & Me!cboCurrency.Column(1) & _
" WHERE ID = " & Me!txtID
Servus
Karl
************
Access News
Access DevCon
- Tony2021Feb 18, 2022Iron ContributorCO ID happens to be 16 too but that is only a coincidence. I should have hidden Co ID column in the pic.