Runtime error 2176 The setting for this property is too long

J

Julie

I'm receiving this message on PCs that are using Access
2000. The Access DB that is giving this error was started
in Access 2000 and further development was/is being
conducted in Access 2002 (Office XP Developer) but I have
not converted it to Access 2002. I open the database in
2000 mode.

Here's the problem:

I populate a combobox rowsource with an store procedure
on SQL 2000, passing the parameters and receiveing the
query data back looping through it until an .EOF exists.
On most PCs (@90%) it works fine, but others all give the
same error message (as in the subject). The stored
procedure query is return without any errors and has the
correct data in the fields too.

I have enclose the code that I use and will CAP remark
the conflicting line:

'Populate the WTID Combo box
'get the current SesID
GetSesID

'get the previous check infor to auto populate general
fields
Dim objConn2 As ADODB.Connection
Set objConn2 = New ADODB.Connection

GetSQLConnection

objConn2.ConnectionString = SQLConnection
objConn2.Open

Dim objRS2 As ADODB.Recordset
Set objRS2 = New ADODB.Recordset

Dim SQLstr2 As String
SQLstr2 = "sp_retrieve_combo '" & SesID
& "', 'TicketsWTID'"

objRS2.ActiveConnection = objConn2

objRS2.Open SQLstr2
'Form_Form1.Text0 = objRS.Fields(0).Value 'This method
gets the column information with an index of 0, or the
first column
YN = objRS2!YN 'This method gets the column
information with the field name TimeStamp.

If YN = 1 Then
RtnRec2 = ""
While Not objRS2.EOF
RtnRec2 = RtnRec2 & objRS2!WTID & ";'" & objRS2!
ShortDesc & "';'" & objRS2!Description & "';"
objRS2.MoveNext
Wend
'HERE'S WHERE IT ERRORS OUT
'the variable RtnRec2 is/has the correct data
Me.WTIDCombo.RowSource = RtnRec2
Else
MsgBox objRS2!Reason & " See your administrator.",
vbCritical, "Query refuse!"
Me.WTIDCombo.RowSource = ""
End If

ConStr2 = objConn2.ConnectionString

If objRS2.State = 1 Then
objRS2.Close
End If

objConn2.Close

Set objConn2 = Nothing
 

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