Error number: 2176

mulderm

Registered User.
Local time
Today, 00:51
Joined
Jul 3, 2004
Messages
13
Hello,

I have a form with a Combobox and the follow code:

Private Sub Form_Load()

Dim bestand As String
Dim lijst As String
Dim pad As String
pad = "c:\bal"
bestand = Dir(pad & "NN*.xls")
Do Until bestand = ""
lijst = lijst & bestand & ";"
bestand = Dir()
Loop
Me.cmbBestanden.RowSource = lijst
end sub

There are totally 1945 files beginning with NN*.xls.
So far no problem.
Now are the files expand to 2500 files!
And now I get the fault warning from Access:
Error number: 2176
The setting for this property is too long.

And the ComboBox is now empty.
Who can help me with this problem?

Greetings,

mulderm
 
There is a 32,750 character limit to the RowSource of a control. You may want to put the names in a temporary table in a temporary mdb instead.
 
What´s the code do put the filenames in a table of a new mdb file?

mulderm
 

Users who are viewing this thread

Back
Top Bottom