Open File Dialog

G

Gabriel

I'm trying to make a form where users can open file dialog box (just like
upload facilities in the internet), then what I want to store in the table
just the directory/folder information and the file name in 2 different field.

Is there a way to do this with access ?

TIA
Gabriel
 
G

Gabriel

Thanks Allen, but it give me only folder name that can be selected, what I'm
try to do is also get the file name then I can store the file name and the
folder name in the database for further process.
 
A

Allen Browne

Ah: you want to have the entire file name returned, and then parse it into
different fields.

For the Windows FileOpen dialog, see:
http://www.mvps.org/access/api/api0001.htm

If you are using Access 2002 or 2003, you can use the FileDialog object for
this kind of thing. Most of us don't because:
- it requires an extra library reference,
- it is version dependent,
- it does not work with the runtine version,
- it does not work at all for SaveAs (even though it appears to offer that
option.)
 
G

Gabriel

Thanks again Allen, that what I'm looking for.

The application I developed is required people in base office send their
request to people on site while on this request people on base office want to
be able to add attached files (picture, drawing, etc). And when people on
site receive this request they can easily launch the attachment. I don't want
to store picture/bitmap files into the database so I just store the file name
and the location then using call() function people on site can launch this
attachment.

Are living in Australia?, we are just close enough.
I'm living in Indonesia, Kalimantan island or Balikpapan city precisely.

Gabriel
 
A

Allen Browne

Excellent! A northern neighbour. :)

BTW, if you are using a hyperlink field to store this, you have another
choice as well. A command button alongside this field would only need 2
lines of code:
Me.[NameOfYourHyperlinkFieldHere].SetFocus
RunCommand acCmdInsertHyperlink

If you are not familiar with the Hyperlink field type, see:
http://members.iinet.net.au/~allenbrowne/casu-09.html
 
G

Gabriel

Earlier version of my application can use hyperlink, but now our back end DB
migrate to Oracle which is around 90 GB (more than 5 instances), so I prefer
to use our first idea, previously I create a form where user should type or
copy paste the folder and the file name, but now my application look more
professional than before.

Again thanks Allen and for the groups!

Allen Browne said:
Excellent! A northern neighbour. :)

BTW, if you are using a hyperlink field to store this, you have another
choice as well. A command button alongside this field would only need 2
lines of code:
Me.[NameOfYourHyperlinkFieldHere].SetFocus
RunCommand acCmdInsertHyperlink

If you are not familiar with the Hyperlink field type, see:
http://members.iinet.net.au/~allenbrowne/casu-09.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Gabriel said:
Thanks again Allen, that what I'm looking for.

The application I developed is required people in base office send their
request to people on site while on this request people on base office want
to
be able to add attached files (picture, drawing, etc). And when people on
site receive this request they can easily launch the attachment. I don't
want
to store picture/bitmap files into the database so I just store the file
name
and the location then using call() function people on site can launch this
attachment.

Are living in Australia?, we are just close enough.
I'm living in Indonesia, Kalimantan island or Balikpapan city precisely.

Gabriel
 
Top