Errorcode 2108

N

news.microsoft.com

Hi,

I try to update some fields in a form using a recordset I get by the
recordsetClone method. When I try to get the focus for a field by setFocus I
get the errorcode 2108. I try to tanslate the message (I get it in German)
You have to save the Field first, before yo can use the GoToContol- or
SetFocus-Method.
It doesn't matter, if the Field is bound or unbound.

This is the code I use:

Private Sub Refresch_UF_Ver4SST()
On Error GoTo ERR_Refresch_UF_Ver4SST
Dim rst As Recordset, intI As Integer
Dim fld As Field
Dim WertStr As String
Set rst = Me.RecordsetClone

intI = 0
rst.MoveFirst
Do While intI < rst.RecordCount
Debug.Print intI
KF_Rolle.Undo
KF_Rolle.SetFocus
KF_Rolle.value = rst("R_Name")
Debug.Print KF_Rolle.value

rst.MoveNext
intI = intI + 1
Loop

Exit Sub
ERR_Refresch_UF_Ver4SST:

Debug.Print Err.Number
Debug.Print Err.Description

End Sub


Maybe somebody can help me. Many thanks.

Mark
 
N

Nikos Yannacopoulos

Mark,

I'm not clear on what you are trying to do here... it looks as though
you are trying to set a new value in a form control based on the value
of a field in its recordset? Why involve the form in updating a
recordset? I suspect you are somewhat confused with recordset
operations. Can you explain in plain english what you are trying to achieve?

Nikos
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top