473,383 Members | 1,837 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Creating an Open Folder Control

1
Hi Everyone,

Am attempting to use MS Access 2000 and ArcGIS to build a comprehensive Land Referencing system, that is orientated to the new and inexperienced user, while also being versatile enough so as it can be used on different projects,

I know this sounds like a relatively simple bit of code but every time I’ve look around other forums I get lost and confused, my VBA understanding is still rather basic so I apologise if this request sound stupid.

My question is how I create custom VBA control that allows me to specify a folder in a text field and then be able to browse its contents at the click of an associated button.

I am familiar with creating a hyperlink field in a table and just displaying the field in a form, but as I am creating a simple user interface, I would prefer to have the user freely able to modify path.

Cheers for any help.
Aug 3 '07 #1
3 7029
Rabbit
12,516 Expert Mod 8TB
You'll want to take a look at the filedialog class.
Aug 3 '07 #2
ADezii
8,834 Expert 8TB
Hi Everyone,

Am attempting to use MS Access 2000 and ArcGIS to build a comprehensive Land Referencing system, that is orientated to the new and inexperienced user, while also being versatile enough so as it can be used on different projects,

I know this sounds like a relatively simple bit of code but every time I’ve look around other forums I get lost and confused, my VBA understanding is still rather basic so I apologise if this request sound stupid.

My question is how I create custom VBA control that allows me to specify a folder in a text field and then be able to browse its contents at the click of an associated button.

I am familiar with creating a hyperlink field in a table and just displaying the field in a form, but as I am creating a simple user interface, I would prefer to have the user freely able to modify path.

Cheers for any help.
Just subscribing - will return later.
Aug 3 '07 #3
ADezii
8,834 Expert 8TB
Hi Everyone,

Am attempting to use MS Access 2000 and ArcGIS to build a comprehensive Land Referencing system, that is orientated to the new and inexperienced user, while also being versatile enough so as it can be used on different projects,

I know this sounds like a relatively simple bit of code but every time I’ve look around other forums I get lost and confused, my VBA understanding is still rather basic so I apologise if this request sound stupid.

My question is how I create custom VBA control that allows me to specify a folder in a text field and then be able to browse its contents at the click of an associated button.

I am familiar with creating a hyperlink field in a table and just displaying the field in a form, but as I am creating a simple user interface, I would prefer to have the user freely able to modify path.

Cheers for any help.

Before you do anything, set a Reference to the Microsoft Office XX.XX Object Library.

Assuming a Text Box on your Form named txtFolder and a Command Button next to this Text Box, in the Click() Event of this Command Button, place the following code. This code will enable you to Browse the Folder you specify in [txtFolder], if the Folder doesn't exist, the My Documents Folder will be open:

Expand|Select|Wrap|Line Numbers
  1. 'If nothing is in txtFolder then get out!
  2. If IsNull(Me![txtFolder]) Then Exit Sub
  3.  
  4. Dim varItem As Variant
  5.  
  6. With Application.FileDialog(msoFileDialogFilePicker)
  7.    With .Filters
  8.      .Clear
  9.      .Add "All Files", "*.*"
  10.    End With
  11.        .AllowMultiSelect = False
  12.        .InitialFileName = Me![txtFolder]
  13.        .InitialView = msoFileDialogViewDetails
  14.               If .Show Then
  15.                 'not needed at this point
  16.                 For Each varItem In .SelectedItems
  17.                 Next varItem
  18.               End If
  19. End With
Aug 3 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: dave | last post by:
I first started using HCW.exe to compile .rtf filew created with MS Word a couple of weeks ago. I used the file | new menu then selected New project in the dialog box and everything worked as...
4
by: Altramagnus | last post by:
I have 30 - 40 type of different window. For each type I need about 20 instances of the window. When I try to create them, I get "Error creating window handle" My guess is there is a maximum...
4
by: Yuri Vorontsov | last post by:
Hallo! We have troubles (post XP SP2) to open local folders from the web application: - the web application allows users to select a local file (input type=file) - the system DOES NOT upload...
3
by: Jon96 | last post by:
I know this posting may seem redundant, but I have not been able to get around this problem I am currently using Windows 2000 Professional with Visual Studio.Net 2002 and IIS 5. I am not on a...
4
by: santel_helvis | last post by:
Hi there, I wanna open the folder using asp.net. I am using anchor link to do that. But in href part how shall I give the location. Anyone plz help me out. Thanks in advance
8
by: William LaMartin | last post by:
I just received my Visual Studio upgrade to 2005 and tried to create a new web site via File | New Web Site with location http. Unfortunately I received the following error: "Visual Web...
0
by: shanthsp2002 | last post by:
well friends i have a small tip here which may be helpfull for u there may be situations where we need to use a customized dilogue box while doveloping setup and dyployment project, so u can do...
8
by: Arno R | last post by:
Hi all. When I need to search for pictures, I always have too choose thumbnail-view manually. Is it possible to open the common dialog in thumbnail-view programmatically? Example ?? At the...
0
by: DKn | last post by:
Hello All, I am having an ACtiveX Control developed in C#.Net 2.0 windows Control Library. I have tested this control.TCS through ACtiveX Control Test Container. It is working fine, But the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.