Run-time Error -2147217900 (80040e14)

focus10

Registered User.
Local time
Today, 12:29
Joined
Mar 8, 2009
Messages
38
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
 
What line is thowing the error? Have you stepped through it yet.
What is different about the offending workstation? O/S, Access Version?

David
 
line is thowing the error is:
For Each fld In rs.Fields
With Me(fld.Name)
.Value = fld.Value

i tried it with access 2002 & with access 2003
 
The only thing that springs to mind is the use of the .Value command.

Have you tried

For Each fld In rs.Fields
Me(fld.Name) = rs(fld.Name)
 

Users who are viewing this thread

Back
Top Bottom