A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to open OS window from a form



 
 
Thread Tools Display Modes
  #1  
Old May 9th, 2008, 09:55 AM posted to microsoft.public.access.forms
Peter Hibbs
external usenet poster
 
Posts: 871
Default How to open OS window from a form

Access 2000, Win XP

I have a form with a Listbox control which shows a list of files in a
particular folder on the Server PC (via a network). I want to be able
to click a button on the form and open a window on the same folder so
that I can move, copy, delete, etc the files in the folder. The full
pathname to the selected folder is stored in a Text box on the form.

In other words, I want the button to simulate the operation of :-
minimizing the Access window, navigating to the folder on the Server
PC and opening a window on the same folder (which is what I have to do
at the moment if I want to change anything in the folder). To return
to the database I can just click on the Access button on the Task Bar.

What code would I need to do this (if it's even possible).

TIA

Peter Hibbs.


  #2  
Old May 9th, 2008, 11:28 AM posted to microsoft.public.access.forms
Arvin Meyer [MVP]
external usenet poster
 
Posts: 4,231
Default How to open OS window from a form

This may help:

http://www.mvps.org/access/api/api0002.htm
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"Peter Hibbs" wrote in message
...
Access 2000, Win XP

I have a form with a Listbox control which shows a list of files in a
particular folder on the Server PC (via a network). I want to be able
to click a button on the form and open a window on the same folder so
that I can move, copy, delete, etc the files in the folder. The full
pathname to the selected folder is stored in a Text box on the form.

In other words, I want the button to simulate the operation of :-
minimizing the Access window, navigating to the folder on the Server
PC and opening a window on the same folder (which is what I have to do
at the moment if I want to change anything in the folder). To return
to the database I can just click on the Access button on the Task Bar.

What code would I need to do this (if it's even possible).

TIA

Peter Hibbs.




  #3  
Old May 9th, 2008, 02:16 PM posted to microsoft.public.access.forms
Peter Hibbs
external usenet poster
 
Posts: 871
Default How to open OS window from a form

Arvin,

No, not quite what I wanted, I already have the pathname for the
required folder, what I want is to open a window on the folder as if I
had opened the folder in Windows XP.

Any other ideas?

Peter Hibbs.

On Fri, 9 May 2008 06:28:38 -0400, "Arvin Meyer [MVP]"
wrote:

This may help:

http://www.mvps.org/access/api/api0002.htm

  #4  
Old May 10th, 2008, 12:17 AM posted to microsoft.public.access.forms
Arvin Meyer [MVP]
external usenet poster
 
Posts: 4,231
Default How to open OS window from a form

I'm still not sure what you want then. You can browse inside a folder with:

http://www.mvps.org/access/api/api0001.htm
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"Peter Hibbs" wrote in message
...
Arvin,

No, not quite what I wanted, I already have the pathname for the
required folder, what I want is to open a window on the folder as if I
had opened the folder in Windows XP.

Any other ideas?

Peter Hibbs.

On Fri, 9 May 2008 06:28:38 -0400, "Arvin Meyer [MVP]"
wrote:

This may help:

http://www.mvps.org/access/api/api0002.htm



  #5  
Old May 10th, 2008, 12:54 AM posted to microsoft.public.access.forms
Jason[_25_]
external usenet poster
 
Posts: 126
Default How to open OS window from a form


"Arvin Meyer [MVP]" wrote in message
...
I'm still not sure what you want then. You can browse inside a folder

with:

http://www.mvps.org/access/api/api0001.htm
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"Peter Hibbs" wrote in message
...
Arvin,

No, not quite what I wanted, I already have the pathname for the
required folder, what I want is to open a window on the folder as if I
had opened the folder in Windows XP.

Any other ideas?

Peter Hibbs.

On Fri, 9 May 2008 06:28:38 -0400, "Arvin Meyer [MVP]"
wrote:

This may help:

http://www.mvps.org/access/api/api0002.htm





  #6  
Old May 10th, 2008, 12:24 PM posted to microsoft.public.access.forms
Peter Hibbs
external usenet poster
 
Posts: 871
Default How to open OS window from a form

Arvin,

OK, a bit more detail.

Imagine you are sitting in front of the computer and Access is
displaying a form on screen. One of the Text fields is displaying a
pathname to a folder, say "C:\My Documents\Access\Accounts\" for
example (actually it will normally be a path to a folder on a Server
PC).

Now I decide I want to delete one of the files in that folder so I
minimize Access (or click on the Show Desktop icon on the task bar
which does the same thing), I click the Windows Start button, then My
Computer, then double click C:\, then double click the My Documents
folder, then double click the Access folder, then double click the
Accounts folder which then shows me the contents of the Accounts
folder. Now I can delete the file (or whatever). With a Network system
it would be even more long winded. OK, the user can set up short cuts
to the 'root' folder to speedup the process a bit but there are
hundreds of subsidiary folders involved here.

The point is that I already know the pathname of the required folder
(it's stored in a Text box on the form) so I would like a button on
the same form which, when clicked, will, in effect perform all the
actions shown above, and open a window on the required folder.

I suppose another alternative (which may be acceptable to my client)
is to run Windows Explorer using the Shell command. Not sure how to do
that either as I would also need to pass the stored pathname to it
somehow.

Any ideas?

Peter Hibbs.

On Fri, 9 May 2008 19:17:32 -0400, "Arvin Meyer [MVP]"
wrote:

I'm still not sure what you want then. You can browse inside a folder with:

http://www.mvps.org/access/api/api0001.htm

  #7  
Old May 10th, 2008, 01:38 PM posted to microsoft.public.access.forms
Arvin Meyer [MVP]
external usenet poster
 
Posts: 4,231
Default How to open OS window from a form

One last question. I understand that you know the path to the folder. Do you
know the filename as well? or will the user be required to just browse to
find it?
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


"Peter Hibbs" wrote in message
...
Arvin,

OK, a bit more detail.

Imagine you are sitting in front of the computer and Access is
displaying a form on screen. One of the Text fields is displaying a
pathname to a folder, say "C:\My Documents\Access\Accounts\" for
example (actually it will normally be a path to a folder on a Server
PC).

Now I decide I want to delete one of the files in that folder so I
minimize Access (or click on the Show Desktop icon on the task bar
which does the same thing), I click the Windows Start button, then My
Computer, then double click C:\, then double click the My Documents
folder, then double click the Access folder, then double click the
Accounts folder which then shows me the contents of the Accounts
folder. Now I can delete the file (or whatever). With a Network system
it would be even more long winded. OK, the user can set up short cuts
to the 'root' folder to speedup the process a bit but there are
hundreds of subsidiary folders involved here.

The point is that I already know the pathname of the required folder
(it's stored in a Text box on the form) so I would like a button on
the same form which, when clicked, will, in effect perform all the
actions shown above, and open a window on the required folder.

I suppose another alternative (which may be acceptable to my client)
is to run Windows Explorer using the Shell command. Not sure how to do
that either as I would also need to pass the stored pathname to it
somehow.

Any ideas?

Peter Hibbs.

On Fri, 9 May 2008 19:17:32 -0400, "Arvin Meyer [MVP]"
wrote:

I'm still not sure what you want then. You can browse inside a folder
with:

http://www.mvps.org/access/api/api0001.htm



  #8  
Old May 10th, 2008, 03:43 PM posted to microsoft.public.access.forms
Peter Hibbs
external usenet poster
 
Posts: 871
Default How to open OS window from a form

No, the user will want to select any file/s from the folder and then
move it, copy it, delete it, rename it, etc, etc. I had considered
giving them the option to just copy or delete a file with some VBA
code but they may also want to move multiple files from the folder in
question to another folder, create a new sub-folder, delete the old
folder and so on. Basically they need all the facilities of a standard
OS Window, all I need to do is give them quick access to the folder
that the database has currently selected so that they don't need to go
through the hassle of finding the relevant folder each time.

Apparently they do this quite a lot, the folders hold copies of
document files (mainly Word but could be PDF and XLS) which they have
created via the database and there is a sub-folder for each client
with sub-sub-folders for various categories of document such as
General Insurance, Motor Insurance, Life Insurance, Mortgage, etc,
etc.

Peter Hibbs.

On Sat, 10 May 2008 08:38:17 -0400, "Arvin Meyer [MVP]"
wrote:

One last question. I understand that you know the path to the folder. Do you
know the filename as well? or will the user be required to just browse to
find it?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:09 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.