I know this gets a bit convoluted but here it goes…
I’m having a problem with an SQL update query. I want to update the ParID field in tblPermits from frmAddress where a lookup field PIN has the correct data. Upon clicking the “Accept” button in frmAddress it should insert the correct ParID into tblPermits and opens the corresponding record in frmPermits.
If I code the frmAddress “Accept” button as following it updates the ParID field in tblPermits, however, it updates all records to the same data.
DoCmd.RunSQL "UPDATE tblPermits SET tblPermits.ParID = [tblParcels].[ParID]"
So I tried adding the where clause:
WHERE ((([tblParcels.ParID])=[forms]![frmAddress]![PIN]))"
but it returns “Invalid bracketing of [tblParcels.ParID].”
So I tried WHERE ((([tblParcels].[ParID])=[forms]![frmAddress]![PIN]))"
But that updated the ParID field in all records again to the same data.
Any suggestions would be greatly appreciated.
Thanks,
SKK
I’m having a problem with an SQL update query. I want to update the ParID field in tblPermits from frmAddress where a lookup field PIN has the correct data. Upon clicking the “Accept” button in frmAddress it should insert the correct ParID into tblPermits and opens the corresponding record in frmPermits.
If I code the frmAddress “Accept” button as following it updates the ParID field in tblPermits, however, it updates all records to the same data.
DoCmd.RunSQL "UPDATE tblPermits SET tblPermits.ParID = [tblParcels].[ParID]"
So I tried adding the where clause:
WHERE ((([tblParcels.ParID])=[forms]![frmAddress]![PIN]))"
but it returns “Invalid bracketing of [tblParcels.ParID].”
So I tried WHERE ((([tblParcels].[ParID])=[forms]![frmAddress]![PIN]))"
But that updated the ParID field in all records again to the same data.
Any suggestions would be greatly appreciated.
Thanks,
SKK