Forum Discussion
Tony2021
Feb 18, 2022Iron Contributor
Add Where Clause
Hello experts, I am trying to add a where clause to the below (red text). It is my code so yes it is not correct. Do you see where I am wrong? Dim strSQL As String DoCmd.RunCommand acCmdSaveR...
- 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
Tony2021
Feb 18, 2022Iron Contributor
Maybe 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 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.