S
stelios
Hi,
I have a combobox which I fill it with a "Value List" from code.
The Problem is: When the "Value List" is greater than 2050 aprox. characters
long I have a run time error '2176' that the value is too long. How Can i
fill it with rows that have length at total more than 2050 aprox.
characters? The "Value List" is character limited?
Thanks in advanced!
Stelios
ps.: (Below is a part of the code)
'###########################################################################
################
Dim RS As recordset
Dim SQLxxx, lstValues, Mon As String
Dim Id As Long
lstValues = ""
Con 'conection function to backend database with dbData the database
object
Me!cboxxxId.RowSourceType = "Value List" 'cboxxxId is the combo box
I want to fill
SQLxxx = "SELECT xxxID, xxx FROM Tablexxx " & _
"WHERE (((yyyID)=" & Me.cboyyyId & ")) " & _ 'Me.cboyyyId
is another combobox by which i filter the cboxxxId combobox
"ORDER BY xxx"
Set RS = dbData.OpenRecordset(SQLxxx, dbOpenDynaset)
If RS.RecordCount <> 0 Then
With RS
.MoveLast
.MoveFirst
Do Until .EOF
Id = !xxxID
Mon = !xxx
Decrypt Mon 'Decrypt is a function by which i
decrypt the data from the table
Mon = DecryptedString
lstValues = lstValues & Id & ";" & Mon & ";"
.MoveNext
Loop
Me!cboxxxId.RowSource = lstValues
End With
End If
I have a combobox which I fill it with a "Value List" from code.
The Problem is: When the "Value List" is greater than 2050 aprox. characters
long I have a run time error '2176' that the value is too long. How Can i
fill it with rows that have length at total more than 2050 aprox.
characters? The "Value List" is character limited?
Thanks in advanced!
Stelios
ps.: (Below is a part of the code)
'###########################################################################
################
Dim RS As recordset
Dim SQLxxx, lstValues, Mon As String
Dim Id As Long
lstValues = ""
Con 'conection function to backend database with dbData the database
object
Me!cboxxxId.RowSourceType = "Value List" 'cboxxxId is the combo box
I want to fill
SQLxxx = "SELECT xxxID, xxx FROM Tablexxx " & _
"WHERE (((yyyID)=" & Me.cboyyyId & ")) " & _ 'Me.cboyyyId
is another combobox by which i filter the cboxxxId combobox
"ORDER BY xxx"
Set RS = dbData.OpenRecordset(SQLxxx, dbOpenDynaset)
If RS.RecordCount <> 0 Then
With RS
.MoveLast
.MoveFirst
Do Until .EOF
Id = !xxxID
Mon = !xxx
Decrypt Mon 'Decrypt is a function by which i
decrypt the data from the table
Mon = DecryptedString
lstValues = lstValues & Id & ";" & Mon & ";"
.MoveNext
Loop
Me!cboxxxId.RowSource = lstValues
End With
End If