?
Solved

Clear a FileListBox

Posted on 2004-04-22
6
Medium Priority
?
1,310 Views
Last Modified: 2011-10-07
Hello Experts,
How do you clear the contents of a filelistbox with a click of a button?

cheers.
0
Comment
Question by:sayeed_seher
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 2

Expert Comment

by:sbennetts
ID: 10888790
The filelist box is listing the files in the path specified in the path property, you either need to change your path, change your pattern to something that doesn't exist (e.g. *.qza) or make the filelist box invisible.
Simon.
0
 

Author Comment

by:sayeed_seher
ID: 10888835
can I get a code example?
0
 
LVL 2

Expert Comment

by:sbennetts
ID: 10888883
To do which?

myForm.myFileListBox.visible = false

will do it or

myForm.myFileListBox.pattern = "*.qza" 'or another file extension...

Simon.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:sayeed_seher
ID: 10889010
I apologize for the confusion, I should have been clearer in the begining. I have a directorylistbox which when I select a folder, shows the contents in the filelistbox. The user can then select a file from the filelistbox. I would like to put a button that will keep the filelistbox visible, yet clear the contents and at the same time not set the pattern or path because that will not allow it to work with the directorylistbox. Hope that helps.
0
 
LVL 2

Accepted Solution

by:
sbennetts earned 500 total points
ID: 10889113
But the filelistbox has a path and will display the files in that path, until the path or pattern changes, the files in that path will always be displayed.

The best option would be the pattern option to change it to something crazy, then when you want to change the directorylistbox, it sets the path and pattern accordingly...
0
 

Author Comment

by:sayeed_seher
ID: 10889179
Thanks for your help!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question