G
Guest
I would like to provide my users the ability to 'attach' a document from Word
or Excel to a record.
Is this possible?
or Excel to a record.
Is this possible?
Allen Browne said:In your table, add a field of type Hyperlink.
The user can then insert a link to the Word or Excel document.
More info:
Introduction to Hyperlink fields
at:
http://allenbrowne.com/casu-09.html
If you wanted to put a little command button on your form beside this text
box, just use this code in the button's Click event procedure:
Me.[NameOfYourHyperlinkFieldHere].SetFocus
RunCommand acCmdInsertHyperlink
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
PosseJohn said:I would like to provide my users the ability to 'attach' a document from
Word
or Excel to a record.
Is this possible?
DDrowe said:Alan,
I found a reply you had on 3/8/06 regarding attaching (linking) files to
an
access database. This work great. My next question - is there a way to
include a "Browse" function so the person filling out the form doesn't
have
to type the whole address, they can just "Browse" and click on the file
they
want to attach?
Thanks
David
Allen Browne said:In your table, add a field of type Hyperlink.
The user can then insert a link to the Word or Excel document.
More info:
Introduction to Hyperlink fields
at:
http://allenbrowne.com/casu-09.html
If you wanted to put a little command button on your form beside this
text
box, just use this code in the button's Click event procedure:
Me.[NameOfYourHyperlinkFieldHere].SetFocus
RunCommand acCmdInsertHyperlink
Allen Browne said:Sure can. This link has the code:
http://www.mvps.org/access/api/api0001.htm
If you have not used an API call before, it may look a bit scary, but it is
easy to use. Just copy everything betwen the "Code Start" and "Code End"
lines into a standard module. Then run TestIt().
There are alternatives that look easier, but none of them are reliable and
versatile as this.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
DDrowe said:Alan,
I found a reply you had on 3/8/06 regarding attaching (linking) files to
an
access database. This work great. My next question - is there a way to
include a "Browse" function so the person filling out the form doesn't
have
to type the whole address, they can just "Browse" and click on the file
they
want to attach?
Thanks
David
Allen Browne said:In your table, add a field of type Hyperlink.
The user can then insert a link to the Word or Excel document.
More info:
Introduction to Hyperlink fields
at:
http://allenbrowne.com/casu-09.html
If you wanted to put a little command button on your form beside this
text
box, just use this code in the button's Click event procedure:
Me.[NameOfYourHyperlinkFieldHere].SetFocus
RunCommand acCmdInsertHyperlink
DDrowe said:Allen,
Some days are better than others - then happens to be an other.
I have copied the code to a module and named it TestIt. How do I run
TestIt()?
Thanks again.
David
Allen Browne said:Sure can. This link has the code:
http://www.mvps.org/access/api/api0001.htm
If you have not used an API call before, it may look a bit scary, but it
is
easy to use. Just copy everything betwen the "Code Start" and "Code End"
lines into a standard module. Then run TestIt().
There are alternatives that look easier, but none of them are reliable
and
versatile as this.
DDrowe said:Alan,
I found a reply you had on 3/8/06 regarding attaching (linking) files
to
an
access database. This work great. My next question - is there a way
to
include a "Browse" function so the person filling out the form doesn't
have
to type the whole address, they can just "Browse" and click on the file
they
want to attach?
Thanks
David
:
In your table, add a field of type Hyperlink.
The user can then insert a link to the Word or Excel document.
More info:
Introduction to Hyperlink fields
at:
http://allenbrowne.com/casu-09.html
If you wanted to put a little command button on your form beside this
text
box, just use this code in the button's Click event procedure:
Me.[NameOfYourHyperlinkFieldHere].SetFocus
RunCommand acCmdInsertHyperlink
Allen Browne said:Name the module something like Module1.
It cannot have the same name as the function.
After that, test that Access understands it correctly, by choosing Compile
on the Debug window (in the code window.)
Then open the Immediate window (press Ctrl+G), and enter:
Call TestIt
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
DDrowe said:Allen,
Some days are better than others - then happens to be an other.
I have copied the code to a module and named it TestIt. How do I run
TestIt()?
Thanks again.
David
Allen Browne said:Sure can. This link has the code:
http://www.mvps.org/access/api/api0001.htm
If you have not used an API call before, it may look a bit scary, but it
is
easy to use. Just copy everything betwen the "Code Start" and "Code End"
lines into a standard module. Then run TestIt().
There are alternatives that look easier, but none of them are reliable
and
versatile as this.
Alan,
I found a reply you had on 3/8/06 regarding attaching (linking) files
to
an
access database. This work great. My next question - is there a way
to
include a "Browse" function so the person filling out the form doesn't
have
to type the whole address, they can just "Browse" and click on the file
they
want to attach?
Thanks
David
:
In your table, add a field of type Hyperlink.
The user can then insert a link to the Word or Excel document.
More info:
Introduction to Hyperlink fields
at:
http://allenbrowne.com/casu-09.html
If you wanted to put a little command button on your form beside this
text
box, just use this code in the button's Click event procedure:
Me.[NameOfYourHyperlinkFieldHere].SetFocus
RunCommand acCmdInsertHyperlink
DDrowe said:OK - I renamed it, verified that Access understood it and then type TestIT
in
the Immediate Window. Everything looked great except when I chose a file
it
put 400 below TestIt in the Intermediate Window. I have a hyperlink field
on
the form and I hit Ctrl+G from there and it did the same thing - asked if
the
file I selected was the right one then put a 400 in the Immediate Window.
I know I'm missing something easy here - I just cant see it.
Thanks
David
Allen Browne said:Name the module something like Module1.
It cannot have the same name as the function.
After that, test that Access understands it correctly, by choosing
Compile
on the Debug window (in the code window.)
Then open the Immediate window (press Ctrl+G), and enter:
Call TestIt
DDrowe said:Allen,
Some days are better than others - then happens to be an other.
I have copied the code to a module and named it TestIt. How do I run
TestIt()?
Thanks again.
David
:
Sure can. This link has the code:
http://www.mvps.org/access/api/api0001.htm
If you have not used an API call before, it may look a bit scary, but
it
is
easy to use. Just copy everything betwen the "Code Start" and "Code
End"
lines into a standard module. Then run TestIt().
There are alternatives that look easier, but none of them are reliable
and
versatile as this.
Alan,
I found a reply you had on 3/8/06 regarding attaching (linking)
files
to
an
access database. This work great. My next question - is there a
way
to
include a "Browse" function so the person filling out the form
doesn't
have
to type the whole address, they can just "Browse" and click on the
file
they
want to attach?
Thanks
David
:
In your table, add a field of type Hyperlink.
The user can then insert a link to the Word or Excel document.
More info:
Introduction to Hyperlink fields
at:
http://allenbrowne.com/casu-09.html
If you wanted to put a little command button on your form beside
this
text
box, just use this code in the button's Click event procedure:
Me.[NameOfYourHyperlinkFieldHere].SetFocus
RunCommand acCmdInsertHyperlink
Allen Browne said:Okay, it is working.
You can now ask for an MDB file by trying this in the Immediate window:
Call GetOpenFile()
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
DDrowe said:OK - I renamed it, verified that Access understood it and then type TestIT
in
the Immediate Window. Everything looked great except when I chose a file
it
put 400 below TestIt in the Intermediate Window. I have a hyperlink field
on
the form and I hit Ctrl+G from there and it did the same thing - asked if
the
file I selected was the right one then put a 400 in the Immediate Window.
I know I'm missing something easy here - I just cant see it.
Thanks
David
Allen Browne said:Name the module something like Module1.
It cannot have the same name as the function.
After that, test that Access understands it correctly, by choosing
Compile
on the Debug window (in the code window.)
Then open the Immediate window (press Ctrl+G), and enter:
Call TestIt
Allen,
Some days are better than others - then happens to be an other.
I have copied the code to a module and named it TestIt. How do I run
TestIt()?
Thanks again.
David
:
Sure can. This link has the code:
http://www.mvps.org/access/api/api0001.htm
If you have not used an API call before, it may look a bit scary, but
it
is
easy to use. Just copy everything betwen the "Code Start" and "Code
End"
lines into a standard module. Then run TestIt().
There are alternatives that look easier, but none of them are reliable
and
versatile as this.
Alan,
I found a reply you had on 3/8/06 regarding attaching (linking)
files
to
an
access database. This work great. My next question - is there a
way
to
include a "Browse" function so the person filling out the form
doesn't
have
to type the whole address, they can just "Browse" and click on the
file
they
want to attach?
Thanks
David
:
In your table, add a field of type Hyperlink.
The user can then insert a link to the Word or Excel document.
More info:
Introduction to Hyperlink fields
at:
http://allenbrowne.com/casu-09.html
If you wanted to put a little command button on your form beside
this
text
box, just use this code in the button's Click event procedure:
Me.[NameOfYourHyperlinkFieldHere].SetFocus
RunCommand acCmdInsertHyperlink