Welcome to Windows Help!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Dialog box that lets the user select the location of a fil..

 
   Windows Help (Home) -> Microsoft Access RSS
Next:  Displaying Yes/no fields the same on all computer..  
Author Message
BZeyger

External


Since: Feb 4, 2009
Posts: 5



(Msg. 1) Posted: Tue Feb 17, 2009 12:57 pm
Post subject: Dialog box that lets the user select the location of a file and st
Archived from groups: microsoft>public>access (more info?)

I am looking for the code that I can enter on a command button to bring up a
windows dialog box. This box is supposed have the user link to a location of
a .pdf file. The location would be stored in a data field named txtlocation
which will connect to a table. I plan to have this datafield as a hyperlink.
How would this be done?

 >> Stay informed about: Dialog box that lets the user select the location of a fil.. 
Back to top
Login to vote
Daniel Pineault

External


Since: Feb 17, 2009
Posts: 5



(Msg. 2) Posted: Tue Feb 17, 2009 1:16 pm
Post subject: RE: Dialog box that lets the user select the location of a file and st
Archived from groups: per prev. post (more info?)

You can find the code using the following link

[URL="http://www.mvps.org/access/api/api0001.htm"]http://www.mvps.org/access/api/api0001.htm[/URL]

 >> Stay informed about: Dialog box that lets the user select the location of a fil.. 
Back to top
Login to vote
BZeyger

External


Since: Feb 4, 2009
Posts: 5



(Msg. 3) Posted: Wed Feb 18, 2009 10:48 am
Post subject: RE: Dialog box that lets the user select the location of a file an
Archived from groups: per prev. post (more info?)

Thank you for this website, but I found it very confusing. I could not get it
to work. Is there an example of this in action?



"Daniel Pineault" wrote:

> You can find the code using the following link
>
> [URL="http://www.mvps.org/access/api/api0001.htm"]http://www.mvps.org/access/api/api0001.htm[/URL]
> --
> Hope this helps,
>
> Daniel Pineault
> [URL="http://www.cardaconsultants.com/"]http://www.cardaconsultants.com/[/URL]
> For Access Tips and Examples: [URL="http://www.devhut.net"]http://www.devhut.net[/URL]
> Please rate this post using the vote buttons if it was helpful.
>
>
>
> "BZeyger" wrote:
>
> > I am looking for the code that I can enter on a command button to bring up a
> > windows dialog box. This box is supposed have the user link to a location of
> > a .pdf file. The location would be stored in a data field named txtlocation
> > which will connect to a table. I plan to have this datafield as a hyperlink.
> > How would this be done?
 >> Stay informed about: Dialog box that lets the user select the location of a fil.. 
Back to top
Login to vote
Douglas J. Steele

External


Since: Nov 27, 2008
Posts: 61



(Msg. 4) Posted: Wed Feb 18, 2009 2:42 pm
Post subject: Re: Dialog box that lets the user select the location of a file an
Archived from groups: per prev. post (more info?)

You need to copy everything in the shaded area (between Code Start and Code
End) into a new module (not a class module nor a module associated with a
form or report). When you save the module, make sure you don't name it the
same as any existing functions. A name like "mdlFileDialog" should be save.

Once you've done, that, you need to use code like the four lines at the top
of the page:

Dim strFilter As String
Dim strInputFileName as string

strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.XLS)", "*.XLS")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select an input file...", _
Flags:=ahtOFN_HIDEREADONLY)

You'd change the line

strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.XLS)", "*.XLS")

to

strFilter = ahtAddFilterItem(strFilter, "Acrobat Files (*.PDF)", "*.PDF")

to have it work with PDF files.
 >> Stay informed about: Dialog box that lets the user select the location of a fil.. 
Back to top
Login to vote
BZeyger

External


Since: Feb 4, 2009
Posts: 5



(Msg. 5) Posted: Wed Feb 18, 2009 2:42 pm
Post subject: Re: Dialog box that lets the user select the location of a file an
Archived from groups: per prev. post (more info?)

Ok....This is great. The dialog box is working and displaying what I want.
However, how do I insert the location I navigated to in the txtLocation field
of my selected record


Thanks

"Douglas J. Steele" wrote:

> You need to copy everything in the shaded area (between Code Start and Code
> End) into a new module (not a class module nor a module associated with a
> form or report). When you save the module, make sure you don't name it the
> same as any existing functions. A name like "mdlFileDialog" should be save.
>
> Once you've done, that, you need to use code like the four lines at the top
> of the page:
>
> Dim strFilter As String
> Dim strInputFileName as string
>
> strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.XLS)", "*.XLS")
> strInputFileName = ahtCommonFileOpenSave( _
> Filter:=strFilter, OpenFile:=True, _
> DialogTitle:="Please select an input file...", _
> Flags:=ahtOFN_HIDEREADONLY)
>
> You'd change the line
>
> strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.XLS)", "*.XLS")
>
> to
>
> strFilter = ahtAddFilterItem(strFilter, "Acrobat Files (*.PDF)", "*.PDF")
>
> to have it work with PDF files.
>
> --
> Doug Steele, Microsoft Access MVP
> [URL="http://I.Am/DougSteele"]http://I.Am/DougSteele[/URL]
> (no e-mails, please!)
>
>
> "BZeyger" wrote in message
>
> > Thank you for this website, but I found it very confusing. I could not get
> > it
> > to work. Is there an example of this in action?
> >
> >
> >
> > "Daniel Pineault" wrote:
> >
> >> You can find the code using the following link
> >>
> >> [URL="http://www.mvps.org/access/api/api0001.htm"]http://www.mvps.org/access/api/api0001.htm[/URL]
> >> --
> >> Hope this helps,
> >>
> >> Daniel Pineault
> >> [URL="http://www.cardaconsultants.com/"]http://www.cardaconsultants.com/[/URL]
> >> For Access Tips and Examples: [URL="http://www.devhut.net"]http://www.devhut.net[/URL]
> >> Please rate this post using the vote buttons if it was helpful.
> >>
> >>
> >>
> >> "BZeyger" wrote:
> >>
> >> > I am looking for the code that I can enter on a command button to bring
> >> > up a
> >> > windows dialog box. This box is supposed have the user link to a
> >> > location of
> >> > a .pdf file. The location would be stored in a data field named
> >> > txtlocation
> >> > which will connect to a table. I plan to have this datafield as a
> >> > hyperlink.
> >> > How would this be done?
>
>
>
 >> Stay informed about: Dialog box that lets the user select the location of a fil.. 
Back to top
Login to vote
BZeyger

External


Since: Feb 4, 2009
Posts: 5



(Msg. 6) Posted: Wed Feb 18, 2009 2:42 pm
Post subject: Re: Dialog box that lets the user select the location of a file an
Archived from groups: per prev. post (more info?)

I figured it out, I entered:
Me.txtLocation = strInputFileName


Thanks for all of your help


"Douglas J. Steele" wrote:

> You need to copy everything in the shaded area (between Code Start and Code
> End) into a new module (not a class module nor a module associated with a
> form or report). When you save the module, make sure you don't name it the
> same as any existing functions. A name like "mdlFileDialog" should be save.
>
> Once you've done, that, you need to use code like the four lines at the top
> of the page:
>
> Dim strFilter As String
> Dim strInputFileName as string
>
> strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.XLS)", "*.XLS")
> strInputFileName = ahtCommonFileOpenSave( _
> Filter:=strFilter, OpenFile:=True, _
> DialogTitle:="Please select an input file...", _
> Flags:=ahtOFN_HIDEREADONLY)
>
> You'd change the line
>
> strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.XLS)", "*.XLS")
>
> to
>
> strFilter = ahtAddFilterItem(strFilter, "Acrobat Files (*.PDF)", "*.PDF")
>
> to have it work with PDF files.
>
> --
> Doug Steele, Microsoft Access MVP
> [URL="http://I.Am/DougSteele"]http://I.Am/DougSteele[/URL]
> (no e-mails, please!)
>
>
> "BZeyger" wrote in message
>
> > Thank you for this website, but I found it very confusing. I could not get
> > it
> > to work. Is there an example of this in action?
> >
> >
> >
> > "Daniel Pineault" wrote:
> >
> >> You can find the code using the following link
> >>
> >> [URL="http://www.mvps.org/access/api/api0001.htm"]http://www.mvps.org/access/api/api0001.htm[/URL]
> >> --
> >> Hope this helps,
> >>
> >> Daniel Pineault
> >> [URL="http://www.cardaconsultants.com/"]http://www.cardaconsultants.com/[/URL]
> >> For Access Tips and Examples: [URL="http://www.devhut.net"]http://www.devhut.net[/URL]
> >> Please rate this post using the vote buttons if it was helpful.
> >>
> >>
> >>
> >> "BZeyger" wrote:
> >>
> >> > I am looking for the code that I can enter on a command button to bring
> >> > up a
> >> > windows dialog box. This box is supposed have the user link to a
> >> > location of
> >> > a .pdf file. The location would be stored in a data field named
> >> > txtlocation
> >> > which will connect to a table. I plan to have this datafield as a
> >> > hyperlink.
> >> > How would this be done?
>
>
>
 >> Stay informed about: Dialog box that lets the user select the location of a fil.. 
Back to top
Login to vote
jo

External


Since: Apr 16, 2010
Posts: 2



(Msg. 7) Posted: Fri Apr 16, 2010 10:16 am
Post subject: Re: Dialog box that lets the user select the location of a file an [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Douglas I noticed this thread on the forum and I needed something like
this and it works great and the extra piece to paste the path in the field.
BUT I would like more options on the type of files to open power point,
word,excel etc.. is this possible?
jo

"Douglas J. Steele" wrote:

> You need to copy everything in the shaded area (between Code Start and Code
> End) into a new module (not a class module nor a module associated with a
> form or report). When you save the module, make sure you don't name it the
> same as any existing functions. A name like "mdlFileDialog" should be save.
>
> Once you've done, that, you need to use code like the four lines at the top
> of the page:
>
> Dim strFilter As String
> Dim strInputFileName as string
>
> strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.XLS)", "*.XLS")
> strInputFileName = ahtCommonFileOpenSave( _
> Filter:=strFilter, OpenFile:=True, _
> DialogTitle:="Please select an input file...", _
> Flags:=ahtOFN_HIDEREADONLY)
>
> You'd change the line
>
> strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.XLS)", "*.XLS")
>
> to
>
> strFilter = ahtAddFilterItem(strFilter, "Acrobat Files (*.PDF)", "*.PDF")
>
> to have it work with PDF files.
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
> "BZeyger" wrote in message
>
> > Thank you for this website, but I found it very confusing. I could not get
> > it
> > to work. Is there an example of this in action?
> >
> >
> >
> > "Daniel Pineault" wrote:
> >
> >> You can find the code using the following link
> >>
> >> http://www.mvps.org/access/api/api0001.htm
> >> --
> >> Hope this helps,
> >>
> >> Daniel Pineault
> >> http://www.cardaconsultants.com/
> >> For Access Tips and Examples: http://www.devhut.net
> >> Please rate this post using the vote buttons if it was helpful.
> >>
> >>
> >>
> >> "BZeyger" wrote:
> >>
> >> > I am looking for the code that I can enter on a command button to bring
> >> > up a
> >> > windows dialog box. This box is supposed have the user link to a
> >> > location of
> >> > a .pdf file. The location would be stored in a data field named
> >> > txtlocation
> >> > which will connect to a table. I plan to have this datafield as a
> >> > hyperlink.
> >> > How would this be done?
>
>
>
 >> Stay informed about: Dialog box that lets the user select the location of a fil.. 
Back to top
Login to vote
Douglas J. Steele

External


Since: Apr 16, 2010
Posts: 1



(Msg. 8) Posted: Fri Apr 16, 2010 1:23 pm
Post subject: Re: Dialog box that lets the user select the location of a file an [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Just set your filter appropriately.

strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.XLS)", "*.XLS")
strFilter = ahtAddFilterItem(strFilter, "PowerPoint Files (*.PPT)", "*.PPT")
strFilter = ahtAddFilterItem(strFilter, "Word Files (*.DOC)", "*.DOC")


--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

"jo" wrote in message

> Hi Douglas I noticed this thread on the forum and I needed something like
> this and it works great and the extra piece to paste the path in the
> field.
> BUT I would like more options on the type of files to open power point,
> word,excel etc.. is this possible?
> jo
>
> "Douglas J. Steele" wrote:
>
>> You need to copy everything in the shaded area (between Code Start and
>> Code
>> End) into a new module (not a class module nor a module associated with a
>> form or report). When you save the module, make sure you don't name it
>> the
>> same as any existing functions. A name like "mdlFileDialog" should be
>> save.
>>
>> Once you've done, that, you need to use code like the four lines at the
>> top
>> of the page:
>>
>> Dim strFilter As String
>> Dim strInputFileName as string
>>
>> strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.XLS)", "*.XLS")
>> strInputFileName = ahtCommonFileOpenSave( _
>> Filter:=strFilter, OpenFile:=True, _
>> DialogTitle:="Please select an input file...", _
>> Flags:=ahtOFN_HIDEREADONLY)
>>
>> You'd change the line
>>
>> strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.XLS)", "*.XLS")
>>
>> to
>>
>> strFilter = ahtAddFilterItem(strFilter, "Acrobat Files (*.PDF)", "*.PDF")
>>
>> to have it work with PDF files.
>>
>> --
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no e-mails, please!)
>>
>>
>> "BZeyger" wrote in message
>>
>> > Thank you for this website, but I found it very confusing. I could not
>> > get
>> > it
>> > to work. Is there an example of this in action?
>> >
>> >
>> >
>> > "Daniel Pineault" wrote:
>> >
>> >> You can find the code using the following link
>> >>
>> >> http://www.mvps.org/access/api/api0001.htm
>> >> --
>> >> Hope this helps,
>> >>
>> >> Daniel Pineault
>> >> http://www.cardaconsultants.com/
>> >> For Access Tips and Examples: http://www.devhut.net
>> >> Please rate this post using the vote buttons if it was helpful.
>> >>
>> >>
>> >>
>> >> "BZeyger" wrote:
>> >>
>> >> > I am looking for the code that I can enter on a command button to
>> >> > bring
>> >> > up a
>> >> > windows dialog box. This box is supposed have the user link to a
>> >> > location of
>> >> > a .pdf file. The location would be stored in a data field named
>> >> > txtlocation
>> >> > which will connect to a table. I plan to have this datafield as a
>> >> > hyperlink.
>> >> > How would this be done?
>>
>>
>>
 >> Stay informed about: Dialog box that lets the user select the location of a fil.. 
Back to top
Login to vote
jo

External


Since: Apr 16, 2010
Posts: 2



(Msg. 9) Posted: Fri Apr 16, 2010 3:13 pm
Post subject: Re: Dialog box that lets the user select the location of a file an [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Douglas thanks for your response, I was looking on different forums and
noticed someone had put "Any Files" for a simular code so I tried it and it
works.

strFilter = ahtAddFilterItem(strFilter, "Any files (*.*)", "*.*")

thanks Jo
"Douglas J. Steele" wrote:

> Just set your filter appropriately.
>
> strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.XLS)", "*.XLS")
> strFilter = ahtAddFilterItem(strFilter, "PowerPoint Files (*.PPT)", "*.PPT")
> strFilter = ahtAddFilterItem(strFilter, "Word Files (*.DOC)", "*.DOC")
>
>
> --
> Doug Steele, Microsoft Access MVP
> http://www.AccessMVP.com/DJSteele
> (no e-mails, please!)
>
> "jo" wrote in message
>
> > Hi Douglas I noticed this thread on the forum and I needed something like
> > this and it works great and the extra piece to paste the path in the
> > field.
> > BUT I would like more options on the type of files to open power point,
> > word,excel etc.. is this possible?
> > jo
> >
> > "Douglas J. Steele" wrote:
> >
> >> You need to copy everything in the shaded area (between Code Start and
> >> Code
> >> End) into a new module (not a class module nor a module associated with a
> >> form or report). When you save the module, make sure you don't name it
> >> the
> >> same as any existing functions. A name like "mdlFileDialog" should be
> >> save.
> >>
> >> Once you've done, that, you need to use code like the four lines at the
> >> top
> >> of the page:
> >>
> >> Dim strFilter As String
> >> Dim strInputFileName as string
> >>
> >> strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.XLS)", "*.XLS")
> >> strInputFileName = ahtCommonFileOpenSave( _
> >> Filter:=strFilter, OpenFile:=True, _
> >> DialogTitle:="Please select an input file...", _
> >> Flags:=ahtOFN_HIDEREADONLY)
> >>
> >> You'd change the line
> >>
> >> strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.XLS)", "*.XLS")
> >>
> >> to
> >>
> >> strFilter = ahtAddFilterItem(strFilter, "Acrobat Files (*.PDF)", "*.PDF")
> >>
> >> to have it work with PDF files.
> >>
> >> --
> >> Doug Steele, Microsoft Access MVP
> >> http://I.Am/DougSteele
> >> (no e-mails, please!)
> >>
> >>
> >> "BZeyger" wrote in message
> >>
> >> > Thank you for this website, but I found it very confusing. I could not
> >> > get
> >> > it
> >> > to work. Is there an example of this in action?
> >> >
> >> >
> >> >
> >> > "Daniel Pineault" wrote:
> >> >
> >> >> You can find the code using the following link
> >> >>
> >> >> http://www.mvps.org/access/api/api0001.htm
> >> >> --
> >> >> Hope this helps,
> >> >>
> >> >> Daniel Pineault
> >> >> http://www.cardaconsultants.com/
> >> >> For Access Tips and Examples: http://www.devhut.net
> >> >> Please rate this post using the vote buttons if it was helpful.
> >> >>
> >> >>
> >> >>
> >> >> "BZeyger" wrote:
> >> >>
> >> >> > I am looking for the code that I can enter on a command button to
> >> >> > bring
> >> >> > up a
> >> >> > windows dialog box. This box is supposed have the user link to a
> >> >> > location of
> >> >> > a .pdf file. The location would be stored in a data field named
> >> >> > txtlocation
> >> >> > which will connect to a table. I plan to have this datafield as a
> >> >> > hyperlink.
> >> >> > How would this be done?
> >>
> >>
> >>
>
>
> .
>
 >> Stay informed about: Dialog box that lets the user select the location of a fil.. 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Front End location - Hello experts. I was just wondering, I have the front end of my split and secured database saved in the C:\Documents and Settings\All Users\Desktop folder because I think it makes it easier for me to update each one. Is there any detriment to putting...

Select query not being saved - In Access 2000, if I build the following SQL, it runs (from the query builder) and gives the expected results. When I save the query, Access deletes the ASC part. How can I have it saved? Thanks, Mike SELECT [UCALL], [Mode] FROM ModRef ORDER BY..

Error running SELECT INTO query - Hi When I run the below query I get the error 'Table _Temp already exists'. How can I get past this such that _Temp table gets overwritten if it already exists? Thanks Regards SELECT INTO _Temp FROM MyTbl WHERE ....

select multiple items combo box - Hi all, I am having some trouble. I am creating a form that where for certain categories the user needs to be able to choose multiple items. I originally tried using a list box but after reading some of the posts here, I decided to try using subform...

HELP When select VBA Editor Access shuts down! - This morning, when I clicked on the VBA Editor to bring up my procedures and modules, I got a "Microsoft Office Access has encountered a problem and needs to close..." My tables, reports and forms all open OK. I tried compacting/repairing....
   Windows Help (Home) -> Microsoft Access All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]