the folowing code is running well in tens machins.
in one of particular machine i get a Run-time Error -2147217900 (80040e14)
"one or more errors occurred during processing of command"
refferences are ok
sql query is ok
compilation is ok
so it must be related to some problem with the particular machine
what can be wrong?
Public Sub CreatRs()
Dim rs As ADODB.Recordset
Dim fld As ADODB.Field
For Each cnt In Form.Controls
If cnt.ControlType = acTextBox Then cnt.Value = Null
Next
Set rs = New ADODB.Recordset
With rs
.CursorLocation = adUseClient
.Open source:="sqlData", ActiveConnection:=CurrentProject.Connection
If .RecordCount > 0 Then
For Each fld In rs.Fields
With Me(fld.Name)
.Value = fld.Value
If .ControlType = acTextBox Then
.Locked = True
.OnDblClick = ""
End If
End With
Next
End If
End With
End Sub
in one of particular machine i get a Run-time Error -2147217900 (80040e14)
"one or more errors occurred during processing of command"
refferences are ok
sql query is ok
compilation is ok
so it must be related to some problem with the particular machine
what can be wrong?
Public Sub CreatRs()
Dim rs As ADODB.Recordset
Dim fld As ADODB.Field
For Each cnt In Form.Controls
If cnt.ControlType = acTextBox Then cnt.Value = Null
Next
Set rs = New ADODB.Recordset
With rs
.CursorLocation = adUseClient
.Open source:="sqlData", ActiveConnection:=CurrentProject.Connection
If .RecordCount > 0 Then
For Each fld In rs.Fields
With Me(fld.Name)
.Value = fld.Value
If .ControlType = acTextBox Then
.Locked = True
.OnDblClick = ""
End If
End With
Next
End If
End With
End Sub