473,599 Members | 3,118 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Looking for an easy way to browse the file system

Hello,

I have some archaic code that I've always used to browse the file system.
Is there anything short and sweet I could use intead, without having to rely
on a new reference? I've used this code since the Access Version 2.0 days,
so I would figure there has to be something a little more compact, but I
can't seem to find anything in the help file.

Any ideas?

Thanks!
Nov 13 '05 #1
7 1488
No, the API call is still the best way to go. You need the 32-bit version of
the code for all versions since Access 95 though. Here 'tis:
http://www.mvps.org/access/api/api0001.htm

There have been other options over the years, including common dialogs which
were buggy and prone to breaking when you switched versions. As you probably
know, a broken reference breaks the entire app, not just the file open part.

Access 2002 and 2003 have a FileDialog object, but it's also useless. It's
part of the Office library (another reference to break), and so it doesn't
work in the mde/runtime where the Office library is not available. Worse, if
appears to offer the File | Save As choice, but that doesn't work at all.

So, the API call is still the only reliable, consistent approach.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Jozef" <SP**********@t elus.net> wrote in message
news:td3ve.1795 446$6l.359547@p d7tw2no...
Hello,

I have some archaic code that I've always used to browse the file system.
Is there anything short and sweet I could use intead, without having to
rely on a new reference? I've used this code since the Access Version 2.0
days, so I would figure there has to be something a little more compact,
but I can't seem to find anything in the help file.

Any ideas?

Thanks!

Nov 13 '05 #2
Jozef wrote:
Hello,

I have some archaic code that I've always used to browse the file system.
Is there anything short and sweet I could use intead, without having to rely
on a new reference? I've used this code since the Access Version 2.0 days,
so I would figure there has to be something a little more compact, but I
can't seem to find anything in the help file.


Avoiding additional references is a *good* thing so avoid the FileScriptingOb ject.

The built-in method in VBA to use is Dir() function. Check out the help.

Also the GetAttr() is useful.
--
'---------------
'John Mishefske
'---------------
Nov 13 '05 #3
Hi John,

Thanks, it's a dialog that I'm looking for though. I'm already familiar
with Dir and GetAttr etc. I can't find much about the browse dialog in the
helpfile, which is why I usually post here.
Thanks!

"John Mishefske" <mi************ @JUNKtds.net> wrote in message
news:42******** @newspeer2.tds. net...
Jozef wrote:
Hello,

I have some archaic code that I've always used to browse the file system.
Is there anything short and sweet I could use intead, without having to
rely on a new reference? I've used this code since the Access Version
2.0 days, so I would figure there has to be something a little more
compact, but I can't seem to find anything in the help file.


Avoiding additional references is a *good* thing so avoid the
FileScriptingOb ject.

The built-in method in VBA to use is Dir() function. Check out the help.

Also the GetAttr() is useful.
--
'---------------
'John Mishefske
'---------------

Nov 13 '05 #4
Jozef wrote:
Hi John,

Thanks, it's a dialog that I'm looking for though. I'm already familiar
with Dir and GetAttr etc. I can't find much about the browse dialog in the
helpfile, which is why I usually post here.
Thanks!

"John Mishefske" <mi************ @JUNKtds.net> wrote in message
news:42******** @newspeer2.tds. net...
Jozef wrote:
Hello,

I have some archaic code that I've always used to browse the file system.
Is there anything short and sweet I could use intead, without having to
rely on a new reference? I've used this code since the Access Version
2.0 days, so I would figure there has to be something a little more
compact, but I can't seem to find anything in the help file.
Avoiding additional references is a *good* thing so avoid the
FileScripting Object.

The built-in method in VBA to use is Dir() function. Check out the help.

Also the GetAttr() is useful.


Understood. I couldn't tell from your original post. See Allen Browne's response - he's
got the answer you need.
Allen Browne said:
No, the API call is still the best way to go. You need the 32-bit version of
the code for all versions since Access 95 though. Here 'tis:
http://www.mvps.org/access/api/api0001.htm


--
'---------------
'John Mishefske
'---------------
Nov 13 '05 #5
Thanks John

"John Mishefske" <mi************ @JUNKtds.net> wrote in message
news:42******** **@newspeer2.td s.net...
Jozef wrote:
Hi John,

Thanks, it's a dialog that I'm looking for though. I'm already familiar
with Dir and GetAttr etc. I can't find much about the browse dialog in
the helpfile, which is why I usually post here.
Thanks!

"John Mishefske" <mi************ @JUNKtds.net> wrote in message
news:42******** @newspeer2.tds. net...
Jozef wrote:

Hello,

I have some archaic code that I've always used to browse the file
system. Is there anything short and sweet I could use intead, without
having to rely on a new reference? I've used this code since the Access
Version 2.0 days, so I would figure there has to be something a little
more compact, but I can't seem to find anything in the help file.

Avoiding additional references is a *good* thing so avoid the
FileScriptin gObject.

The built-in method in VBA to use is Dir() function. Check out the help.

Also the GetAttr() is useful.


Understood. I couldn't tell from your original post. See Allen Browne's
response - he's got the answer you need.
Allen Browne said:
No, the API call is still the best way to go. You need the 32-bit
version of
the code for all versions since Access 95 though. Here 'tis:
http://www.mvps.org/access/api/api0001.htm


--
'---------------
'John Mishefske
'---------------

Nov 13 '05 #6
Thanks Allen! I had a chance to try that out and it's perfect. It's a
WHOLE lot smaller than the current code I'm using.

Thanks again!
"Allen Browne" <Al*********@Se eSig.Invalid> wrote in message
news:42******** *************** @per-qv1-newsreader-01.iinet.net.au ...
No, the API call is still the best way to go. You need the 32-bit version
of the code for all versions since Access 95 though. Here 'tis:
http://www.mvps.org/access/api/api0001.htm

There have been other options over the years, including common dialogs
which were buggy and prone to breaking when you switched versions. As you
probably know, a broken reference breaks the entire app, not just the file
open part.

Access 2002 and 2003 have a FileDialog object, but it's also useless. It's
part of the Office library (another reference to break), and so it doesn't
work in the mde/runtime where the Office library is not available. Worse,
if appears to offer the File | Save As choice, but that doesn't work at
all.

So, the API call is still the only reliable, consistent approach.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Jozef" <SP**********@t elus.net> wrote in message
news:td3ve.1795 446$6l.359547@p d7tw2no...
Hello,

I have some archaic code that I've always used to browse the file system.
Is there anything short and sweet I could use intead, without having to
rely on a new reference? I've used this code since the Access Version
2.0 days, so I would figure there has to be something a little more
compact, but I can't seem to find anything in the help file.

Any ideas?

Thanks!


Nov 13 '05 #7
I realize the original poster specified not setting a new reference.
Although I have written my own versions of api call for file browsing I
have discarded these as I find it much easier to set a reference to
"Microsoft Shell Controls and Automation" and to run:
Dim s As Shell32.Shell
Set s = New Shell32.Shell
s.Explore ("C:\")
The reference exposes a great many procedures, functions and dialogs,
including the BrowseForFolder Dialog.
If one prefers late binding:
Dim s As Object
Set s = CreateObject("S hell.Applicatio n")
s.Explore ("C:\")

Nov 13 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
9911
by: Ron Brennan | last post by:
Good afternoon. The entire task that I'm trying to achieve is to allow a user to browse and upload multiple files simultaneously, hiding the Browse button of <input> tags of type="file" and replacing it with a button of my own background color and text. The file paths I'd like displayed in a textarea and then the files uploaded at once.
21
66796
by: strutsng | last post by:
<input type="file"> only allows the user to browse for files. How about "browse for folder" dialog? Can html/javascript do that? I couldn't find any syntax for that. If not, please advise what are the other approaches. please advise. thanks!!
3
2234
by: Wardeaux | last post by:
Hey all, need sample/article how to let user browse local drives to select a file and have the local drive location returned so I can store it in my db, similar to a file upload but without the actual file transfer and I need the full path... any assist is greatly appreciated!! MTIA wardeaux
3
1822
by: UJ | last post by:
How can I add a browse button to my asp.net page? What I need is a button they can press that will then let them select the file to upload to the server. And if anybody has any good code on how to upload a file to the server I'd appreciate that also. TIA - Jeffrey.
5
3128
by: Mike Moore | last post by:
I need to create something very similiar to the browse folder capability. This would allow me to support the following - A user would create a document on their server, then they would need to login to the application which we are building to 1). the user would locate their purchase request record in the application. 2). browse the directory for the newly created document 3). find it 4). they would click a save button - this would...
0
1002
by: vbfoobar | last post by:
Hello, I am looking for Python code no other language wanted) that I couls use/reuse/adapt to implement (via CGI, no specific app server wanted) a web-based app that would offer the following functionality: - browse a file hierarchy perhaps dealing with access rights check - classical file management operations like viewing downloading and perhaps renaming or deleting or copying...
4
3106
by: DMG | last post by:
I have <identity impersonate = "true" /& <authentication mode="Windows"/in the web.config. This is a 2.0 site. My Goal: I want to simply have the user browse to a file on a mapped drive and get the UNC for that file and eventually save that unc path to the database as a link. The problem is depending on office we have the same drive letter mapped to different servers. My current test works when I run everything locally and maps...
20
6032
by: ram.rachum | last post by:
Hey, I'm looking for a good Python environment. That is, at least an editor and a debugger, and it should run on Windows. Does anyone have any idea?
0
8398
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8400
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8051
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6725
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5850
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3898
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3940
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2414
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1250
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.