This Recordeset is not updateable...

Nightowl4933

Tryin' to do it right...
Local time
Today, 06:58
Joined
Apr 27, 2016
Messages
151
I'm getting this when I try to update fields on a form and, although I've looked on the internet and found results relating to Queries, they don't seem to apply as the form is only linked to a table - and I'm confused (again!)

The only thing I can think of that could be causing this is the main table linked to another table as a lookup.

I'm going to update a temporary copy of the table to replace the lookup field with the actual data, but would appreciate it if soneone can tell me if I'm barking up the wrong tree?

Thanks,

Pete
 
OK, a bit of an update...

If I open the form by double-clicking if from the Object browser window, I can edit the data.

If I open the same form from a cmdButton, I can't. The cmdButton event is:

Private Sub cmdEdit_Click()

Dim strAuthority As String
Dim strReference As String
Dim strTown As String
Dim strSearchString As String

strAuthority = txtAuthority.Value
strReference = txtInitPlanApp.Value
strTown = txtTown.Value
strSearchString = "[Initial Planning Application Reference] = '" & strReference & "' AND [Town] = '" & _
strTown & "' AND [Initial Planning Application Reference] = '" & strReference & "'"

DoCmd.OpenForm "frmApplicationUpdateResult", , , strSearchString, , , OpenArgs:=Me.Name

With Me
.Visible = False
.Modal = False
End With

Forms!frmApplicationUpdateResult.cmdReturn.SetFocus

End Sub

Thanks.
 
Hi Minty,

Did that, but with the same result.

Not sure where to go next...

Pete
 
You code looks a bit odd to me particularly this line;
Code:
strSearchString = "[Initial Planning Application Reference] = '" & strReference & "' AND [Town] = '" & _
strTown & "' AND [Initial Planning Application Reference] = '" & strReference & "'"
You seem to be referring to the same criteria ( [Initial Planning Application Reference] ) twice, which may be confusing access somewhat?
 
I saw that - what a melon! That didn't resolve it, though.

I also got rid of the fields with lookups associated with them and calculated fields, but that didn't help, either.

Funnily enough though, there are a few weird things going on!

When I double click the form in the object browser, I can edit the data in the fields.

The form is 'opened' from a Command Button on two other forms. If I open the form from one of these, it's editable, but from the other it's not. There is no difference in the On_Click event code, either. Also, when I put the Lookup fields back, the same field showed the expected value from one 'source' form, but the other showed a '#Name?' error. These and all the other controls are set using the On_Load event of the form.

In case it's relevant, I can edit the data on the form when it's showing the error, but if I remove the datasource (make in Unbound) the error is the same. I have a calculated field on the form too, so that's next.

I'm disappearing up my own nostrils!

Pete
 
Last edited:
I'm disappearing up my own nostrils!

I can't offer any suggestions, this problem has tortured me a few times too...BUT...you have managed to provide me with a witticism that I have never heard before, and that is not easy to do...!

Hope you get this sorted out...
 
Well, I sorted it - in a roundabout sort of way.

As I keep backups, I changed the the name of the form causing the problem and imported an older one. I spent ages reconfiguring it to look like the knackered one and? It works - although everything is the same. I changed one control at a time, ended up with the same form, and it works.

The only thing I can't sort out is the calculated field that works from one source form, but not the other - I get the #Name? error, instead.

I tried to do the same and import an older form, but they don't work in this version of the database, but it does in the other one.

Any ideas?

Thanks.
 
Re: This Recordset is not updateable...

I DID IT! :D :D

I had the DLookUp looking at the wrong tablename!

Wot a plum :o
 

Users who are viewing this thread

Back
Top Bottom