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
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.txtID
Right 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
- 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 ContributorPerfect. It works! I am sorry but I started off on the wrong foot. I said INSERT but it was UPDATE. I get those mixed up sometimes.
thank you very much.- George_HepworthFeb 18, 2022Silver ContributorSometimes an abrupt learning experience is needed to cement the understanding that eludes us. Continued success with the project.