I have to maintain some legacy database system that uses MS Access 2016 as a frontend. The data is stored in a PostgreSQL database and connection is made with psqlODBC.
There is a form, from where I can select some dataset, make some edits and save it back. This is where the trouble starts.
The table looks like this
projectnumber(Primary key) namegroup(Primary key) namecostnumeric
The relevant code looks like this
Dim rs As Recordset
Dim dbs As Database
Set dbs = CurrentDb
Set rs = dbs.OpenRecordset("public_SomeTable", dbOpenDynaset)
rs.FindFirst ("[projectnumber] = '" & projektnumber & "'" & " And [group] ='" & group & "'")
rs.Edit
rs!cost = cost
rs.Update
rs.Close
This seems to work fine, unless group contains an Umlaut, i.e. Motorhead works fine, but Motörhead does not.
In that case, I get runtime error 3167: Record deleted.
Which is confusing, as the record still exists