1a8e3 adding an attachment and view a file in a form - Page 2
Sign Up |  Live StatsLive Stats    Articles 37,346| Comments 177,367| Members 19,421, Newest ishpreet| Online 444
Home Contact
 (Forgotten?): 
    Sikhism
    For best SPN experience, use Firefox Internet Browser!


                                                                   Your Banner Here!    




Click Here to Register/Sign Up Daily Hukamnama Member Blogs Downloads Website Navigation Help Fonts Tags
Sikh Philosophy Network » Sikh Philosophy Network » Current News » Information Technology » adding an attachment and view a file in a form

adding an attachment and view a file in a form

Our Donation Goal : Why Donate? : Donate Today! : Donate Anonymously (ਗੁਪਤ) : Our Family of Supporters
Goal this month: 500 USD, Received: 115 USD (23%)
Please Donate...
     
Related Topics...
Thread Thread Starter Forum Replies Last Post
Adding a Field to a Form ktie2332 Information Technology 28 28-Jul-2006 08:26 AM
access 2007 add attachment form needs a link to scaner Saied Information Technology 0 28-Jul-2006 08:16 AM
How do I change from datasheet view to form view Lisa Information Technology 3 28-Jul-2006 08:09 AM
Send file attachment if it exists TOMAC Information Technology 0 28-Jul-2006 08:01 AM
Re: send xls file as attachment from access vba Neil Sunderland Information Technology 0 10-Nov-2005 21:09 PM


Tags
adding, attachment, view, file, form
Reply Post New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!
  #10 (permalink)  
Old 28-Jul-2006, 08:33 AM
chris1980's Avatar chris1980
Guest
 
Posts: n/a
   
   
Re: adding an attachment and view a file in a form

  Donate Today!   Email to Friend  Tell a Friend   Show Printable Version  Print   Contact sikhphilosophy.net Administraion for any Suggestions, Ideas, Feedback.  Feedback  

Register to Remove Advertisements
hey. i tried to make a field by the name of attachment in the table and
then created a text box in the form so then the hyperlink i have in my
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/12832-adding-an-attachment-view-file-form.html
table will automatically appear in the form but when i click on the
hyperlink in the form it says that (hyperlinks can be harmful only use
trusted sources, etc) if you click yes the document opens if no then it
does not open the document. can i get rid of that message?
chris1980 wrote:
> i have already tried that api code. i created a module and copied the
> code in a standard module but it gives me an error on StrFilter for
> some reason i am still trying to debug that problem. and i was reading
> these forums MSaccess i have seen a guy posting that he already have
> created a button to attach a file in a form but his question was how to
> submit that form through email or something like that. the second
> process you told me i believe that all the users who are entering the
> data in the form need to enter a valid path of the file in the table
> and then add that Onclick procedure you just give me to view it. IS
> this the only efficient way to do it? Anyways thanks for your help and
> i will try to do this thing rite now i have been wrokin on it 2 weeks
> nights and days searching cause i think everything is possible .
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12832
> Appreciate that i will keep you updated.
> Thanks
> Steve Schapel wrote:
> > Chris,
> >
> > Ok, just to clarify, you can't literally attach a file to the record.
> > What you are doing is entering the path/name of the file into a field in
> > the table.
> >
> > So, there are two separate processes.
> >
> > One is the process of entering the file's path/name into the database.
> > The simplest method, of course, is to just type it in (assuming you know
> > it!) If you want the user to have access to a file explorer/selection
> > dialog, you will need to use some API code. There is some good
> > information on this at http://www.mvps.org/access/api/api0001.htm
> >
> > The other is, once the file's path/name is entered into the database, to
> > open that file for the current record. If the file's path/name is
> > entered into a field with a hyperlink data type, you can just click on
> > the textbox on the form, and the file should open. An alternative
> > approach, if you want to use a command button to open the file, is to
> > use code like this...
> > Application.FollowHyperlink Me.NameOfFieldWithFileName
> >
> > --
> > Steve Schapel, Microsoft Access MVP
> >
> >
> > chris1980 wrote:
> > > Thanks for replying Steve. when a user clicks on AddaFile button it
> > > will let the user choose a file from his Computer hard drive like the
> > > file name is ISSUE2. when he clicks on that addafile button i want him
> > > to add an attachment file to that record so that for our superiors when
> > > they access the database they can see the file directly in the record
> > > related to that that Issue rather than emailing them personally. there
> > > is always a different issue file for each record. and for viewing i
> > > think once i am able to attach a file for that specific record the user
> > > will be automatically able to view that file whatever format the file
> > > is. i am still on computer so i will be answering your questions.






Got anything to share on This Topic? Why not share your immediate thoughts/reaction with us! Login Now! or Sign Up Today! to share your views... Gurfateh!
Reply With Quote
Sponsored Links
  #11 (permalink)  
Old 28-Jul-2006, 08:33 AM
chris1980's Avatar chris1980
Guest
 
Posts: n/a
   
   
Re: adding an attachment and view a file in a form

And yes Somehow This works the table thing but not an efficient way but
its better than nothing . Thanks for your help steve. still curious
about that msg which is displayed once you click on the link.
chris1980 wrote:
> hey. i tried to make a field by the name of attachment in the table and
> then created a text box in the form so then the hyperlink i have in my
> table will automatically appear in the form but when i click on the
> hyperlink in the form it says that (hyperlinks can be harmful only use
> trusted sources, etc) if you click yes the document opens if no then it
> does not open the document. can i get rid of that message?
> chris1980 wrote:
> > i have already tried that api code. i created a module and copied the
> > code in a standard module but it gives me an error on StrFilter for
> > some reason i am still trying to debug that problem. and i was reading
> > these forums MSaccess i have seen a guy posting that he already have
> > created a button to attach a file in a form but his question was how to
> > submit that form through email or something like that. the second
> > process you told me i believe that all the users who are entering the
> > data in the form need to enter a valid path of the file in the table
> > and then add that Onclick procedure you just give me to view it. IS
> > this the only efficient way to do it? Anyways thanks for your help and
> > i will try to do this thing rite now i have been wrokin on it 2 weeks
> > nights and days searching cause i think everything is possible .
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12832
> > Appreciate that i will keep you updated.
> > Thanks
> > Steve Schapel wrote:
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12832
> > > Chris,
> > >
> > > Ok, just to clarify, you can't literally attach a file to the record.
> > > What you are doing is entering the path/name of the file into a field in
> > > the table.
> > >
> > > So, there are two separate processes.
> > >
> > > One is the process of entering the file's path/name into the database.
> > > The simplest method, of course, is to just type it in (assuming you know
> > > it!) If you want the user to have access to a file explorer/selection
> > > dialog, you will need to use some API code. There is some good
> > > information on this at http://www.mvps.org/access/api/api0001.htm
> > >
> > > The other is, once the file's path/name is entered into the database, to
> > > open that file for the current record. If the file's path/name is
> > > entered into a field with a hyperlink data type, you can just click on
> > > the textbox on the form, and the file should open. An alternative
> > > approach, if you want to use a command button to open the file, is to
> > > use code like this...
> > > Application.FollowHyperlink Me.NameOfFieldWithFileName
> > >
> > > --
> > > Steve Schapel, Microsoft Access MVP
> > >
> > >
> > > chris1980 wrote:
> > > > Thanks for replying Steve. when a user clicks on AddaFile button it
> > > > will let the user choose a file from his Computer hard drive like the
> > > > file name is ISSUE2. when he clicks on that addafile button i want him
> > > > to add an attachment file to that record so that for our superiors when
> > > > they access the database they can see the file directly in the record
> > > > related to that that Issue rather than emailing them personally. there
> > > > is always a different issue file for each record. and for viewing i
> > > > think once i am able to attach a file for that specific record the user
> > > > will be automatically able to view that file whatever format the file
> > > > is. i am still on computer so i will be answering your questions.


Reply With Quote
  #12 (permalink)  
Old 28-Jul-2006, 08:35 AM
Steve Schapel's Avatar Steve Schapel
Guest
 
Posts: n/a
   
   
Re: adding an attachment and view a file in a form

Sorry, Chris, I have not encountered this. What type of files are they?

--
Steve Schapel, Microsoft Access MVP

chris1980 wrote:
> hey. i tried to make a field by the name of attachment in the table and
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12832
> then created a text box in the form so then the hyperlink i have in my
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12832
> table will automatically appear in the form but when i click on the
> hyperlink in the form it says that (hyperlinks can be harmful only use
> trusted sources, etc) if you click yes the document opens if no then it
> does not open the document. can i get rid of that message?

Reply With Quote
  #13 (permalink)  
Old 28-Jul-2006, 08:35 AM
Steve Schapel's Avatar Steve Schapel
Guest
 
Posts: n/a
   
   
Re: adding an attachment and view a file in a form

Chris,

Just to summarise/clarify...

The path/file name ultimately needs to be entered into the table in any
case. No matter what method you use to access the file, its path and
name need to be recorded in the table. Normally this will be done via
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12832
the form interface. So in this regard, really the choices are either to
enter the path/file name by typing it into a textbox, or to enter the
path/file name by selecting it from the Windows File common dialog,
which is what the API code is all about. But the end result is still
the same - the path and name of the file is recorded in a field in a table.

And then, there is the question of accessing the file from within the
database application. Again, two choices. Either the field you use to
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12832
store the path/file name is a hyperlink data type, and you open the file
by clicking directly on the form control. Or you use some other event,
such as clicking a command button, in which case you need to use code.
The FollowHyperlink method I mentioned is one approach - there are others.

So (apart form the "unsafe hyperlink" warning message you are getting),
is there any problem with any of this? I am not sure I understand what
you mean about efficiency.

--
Steve Schapel, Microsoft Access MVP


chris1980 wrote:
> i have already tried that api code. i created a module and copied the
> code in a standard module but it gives me an error on StrFilter for
> some reason i am still trying to debug that problem. and i was reading
> these forums MSaccess i have seen a guy posting that he already have
> created a button to attach a file in a form but his question was how to
> submit that form through email or something like that. the second
> process you told me i believe that all the users who are entering the
> data in the form need to enter a valid path of the file in the table
> and then add that Onclick procedure you just give me to view it. IS
> this the only efficient way to do it? Anyways thanks for your help and
> i will try to do this thing rite now i have been wrokin on it 2 weeks
> nights and days searching cause i think everything is possible .
> Appreciate that i will keep you updated.

Reply With Quote
  #14 (permalink)  
Old 28-Jul-2006, 08:35 AM
chris1980's Avatar chris1980
Guest
 
Posts: n/a
   
   
Re: adding an attachment and view a file in a form

I got it steve thanks for all your help and replies i really appreciate
that. Followhyperlink works fine came to know i need to have a # sign
in the beginning and at the end. Thanks alot steve. i am still a newbie
and i am in love now working with access. i try to take the hardest
projetcs which no one can do in my company and do alot of research
learn more so then one day i can be an MVP also . take care
Thanks
Steve Schapel wrote:
> Chris,
>
> Just to summarise/clarify...
>
> The path/file name ultimately needs to be entered into the table in any
> case. No matter what method you use to access the file, its path and
> name need to be recorded in the table. Normally this will be done via
> the form interface. So in this regard, really the choices are either to
> enter the path/file name by typing it into a textbox, or to enter the
> path/file name by selecting it from the Windows File common dialog,
> which is what the API code is all about. But the end result is still
> the same - the path and name of the file is recorded in a field in a table.
>
> And then, there is the question of accessing the file from within the
> database application. Again, two choices. Either the field you use to
> store the path/file name is a hyperlink data type, and you open the file
> by clicking directly on the form control. Or you use some other event,
> such as clicking a command button, in which case you need to use code.
> The FollowHyperlink method I mentioned is one approach - there are others.
>
> So (apart form the "unsafe hyperlink" warning message you are getting),
> is there any problem with any of this? I am not sure I understand what
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12832
> you mean about efficiency.
>
> --
> Steve Schapel, Microsoft Access MVP
>
>
> chris1980 wrote:
> > i have already tried that api code. i created a module and copied the
> > code in a standard module but it gives me an error on StrFilter for
> > some reason i am still trying to debug that problem. and i was reading
> > these forums MSaccess i have seen a guy posting that he already have
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12832
> > created a button to attach a file in a form but his question was how to
> > submit that form through email or something like that. the second
> > process you told me i believe that all the users who are entering the
> > data in the form need to enter a valid path of the file in the table
> > and then add that Onclick procedure you just give me to view it. IS
> > this the only efficient way to do it? Anyways thanks for your help and
> > i will try to do this thing rite now i have been wrokin on it 2 weeks
> > nights and days searching cause i think everything is possible .
> > Appreciate that i will keep you updated.


Reply With Quote
  #15 (permalink)  
Old 28-Jul-2006, 08:35 AM
Steve Schapel's Avatar Steve Schapel
Guest
 
Posts: n/a
   
   
Re: adding an attachment and view a file in a form

  Donate Today!  
That's brilliant, Chris. Best wishes.

--
Steve Schapel, Microsoft Access MVP
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12832
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12832

chris1980 wrote:
> I got it steve thanks for all your help and replies i really appreciate
> that. Followhyperlink works fine came to know i need to have a # sign
> in the beginning and at the end. Thanks alot steve. i am still a newbie
> and i am in love now working with access. i try to take the hardest
> projetcs which no one can do in my company and do alot of research
> learn more so then one day i can be an MVP also . take care

Reply With Quote
   Click Here to Donate Now!

Support Us!
Become a Promoter!
Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh!
ReplyPost New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!

Bookmarks


(View-All Members who have read this thread : 0
There are no names to display.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Tools Search
Search:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

» Active Discussions
Paneer: what I have...
Today 15:39 PM
1 Replies, 32 Views
Is Science a Religion?
Today 15:04 PM
12 Replies, 1,977 Views
Woolwich Killing: The...
Today 14:01 PM
16 Replies, 203 Views
How does Sikhi help you...
Today 13:37 PM
45 Replies, 1,158 Views
Rochester Gurdwara...
Today 10:55 AM
2 Replies, 72 Views
US Congress panel passes...
Today 04:22 AM
0 Replies, 40 Views
Harmeet Kaur Took the...
Today 03:40 AM
0 Replies, 57 Views
Rozana Reports (ਪੰਜਾਬੀ...
Today 01:43 AM
319 Replies, 7,698 Views
Sikh Spokesman (ਪੰਜਾਬੀ...
Today 00:36 AM
182 Replies, 4,622 Views
Panjabi Alphabet Resource
Yesterday 23:15 PM
12 Replies, 6,559 Views
Transgenderism ... Right...
Yesterday 22:55 PM
30 Replies, 1,369 Views
Biography of a Scholar:...
Yesterday 22:53 PM
1 Replies, 83 Views
Dusting The Web
Yesterday 22:25 PM
0 Replies, 46 Views
How Pure the Tongue? New...
Yesterday 21:29 PM
0 Replies, 63 Views
Stockholm riots throw...
Yesterday 21:14 PM
1 Replies, 46 Views
» Books You Should Read...
Powered by vBadvanced CMPS v3.2.3
All times are GMT +6.5. The time now is 17:22 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2 Copyright © 2004-12, All Rights Reserved. Sikh Philosophy Network


Page generated in 3.63890 seconds with 32 queries
0