×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Error number 2176

Error number 2176

Error number 2176

(OP)
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

RE: Error number 2176

Hi mulderm,

I think your string "lijst" is just too long, switch to an array to load your files, then change your combo box RowSource to:

CODE

Me.cmbBestanden.RowSource = Join(lijst, ";")

HTH
Todd

RE: Error number 2176

(OP)
Thank you for the information.

mulderm

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources