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
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