473,385 Members | 1,353 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

FOr some reason my hyperlink is not working.

I have a form with a Command button. i have a text box also which is
bound to my
Button. i have created a standard module and created an onclick event
for my button
which is something like this ( if a user clicks on the button it will
give an option
to the user to add a file. The Path of that file will be copied to the
textbox which is associated
to my control or button.) i changed the data type also for my textbox
to
Hyperlink so then
when a user clicks on that path which is in the textbox it will
automatically open that document. Well for
some reason it is not working may be i am doing something wrong. any
help or suggestions will be really appreciated.
Thanks

Jul 12 '06 #1
4 6463
su********@gmail.com wrote:
I have a form with a Command button. i have a text box also which is
bound to my
Button. i have created a standard module and created an onclick event
for my button
which is something like this ( if a user clicks on the button it will
give an option
to the user to add a file. The Path of that file will be copied to the
textbox which is associated
to my control or button.) i changed the data type also for my textbox
to
Hyperlink so then
when a user clicks on that path which is in the textbox it will
automatically open that document. Well for
some reason it is not working may be i am doing something wrong. any
help or suggestions will be really appreciated.
Thanks
I like http://www.mvps.org/access/api/api0001.htm for getting a
file/open dialog box to pick the file.

And I prefer http://www.mvps.org/access/api/api0018.htm to using
hyperlinks. Now, I will store a value to a hyperlink field. Ex:
rst!Hyper = "Hit Me#C:\Test\Bonk.JPG"
however, I'll break the two using HyperLinkPart. I'll display the Hit
Me in a text field and the file name in a hidden field. Then I call the
API018 routine to open the file. I like it because I can make it a
dbl-click event.

In your case you might want to check out FollowHyperLink or Follow in
help. I'm not sure how you changed the text box to hyperlink, better
you changed the table's field type to Hyperlink.
Jul 13 '06 #2
hi salad
Thanks for the reply. well i used the same function for open/save
dialog and then created an onclick procedure for my button :

Private Sub AddaFile_Click()
Me.YourTextBoxName = GetOpenFile(CurrentProject.Path, "Select Source
File")
End Sub

and then i created one more onclick procedure for my textbox which was
something like this:

Private Sub Attachments_Click()
Application.FollowHyperlink (Attachments & "#" & txtLOC & "#")
End Sub

it work fine for me now. came to know that for some reason you need to
have a # sign at the begining and at the end. but i will try tomorrow
the hyperlink function you posted so then i can learn more about it.
Thanks for the reply.
salad wrote:
su********@gmail.com wrote:
I have a form with a Command button. i have a text box also which is
bound to my
Button. i have created a standard module and created an onclick event
for my button
which is something like this ( if a user clicks on the button it will
give an option
to the user to add a file. The Path of that file will be copied to the
textbox which is associated
to my control or button.) i changed the data type also for my textbox
to
Hyperlink so then
when a user clicks on that path which is in the textbox it will
automatically open that document. Well for
some reason it is not working may be i am doing something wrong. any
help or suggestions will be really appreciated.
Thanks
I like http://www.mvps.org/access/api/api0001.htm for getting a
file/open dialog box to pick the file.

And I prefer http://www.mvps.org/access/api/api0018.htm to using
hyperlinks. Now, I will store a value to a hyperlink field. Ex:
rst!Hyper = "Hit Me#C:\Test\Bonk.JPG"
however, I'll break the two using HyperLinkPart. I'll display the Hit
Me in a text field and the file name in a hidden field. Then I call the
API018 routine to open the file. I like it because I can make it a
dbl-click event.

In your case you might want to check out FollowHyperLink or Follow in
help. I'm not sure how you changed the text box to hyperlink, better
you changed the table's field type to Hyperlink.
Jul 14 '06 #3
su********@gmail.com wrote:
hi salad
Thanks for the reply. well i used the same function for open/save
dialog and then created an onclick procedure for my button :

Private Sub AddaFile_Click()
Me.YourTextBoxName = GetOpenFile(CurrentProject.Path, "Select Source
File")
End Sub

and then i created one more onclick procedure for my textbox which was
something like this:

Private Sub Attachments_Click()
Application.FollowHyperlink (Attachments & "#" & txtLOC & "#")
End Sub

it work fine for me now. came to know that for some reason you need to
have a # sign at the begining and at the end. but i will try tomorrow
the hyperlink function you posted so then i can learn more about it.
Thanks for the reply.
salad wrote:
>>su********@gmail.com wrote:
GREAT!

Now here's an issue. I was grabbing info, let's say a subject line, for
the link's display text. Something like
"Progress Report" and the filename was
C:\Test\Job# 123.Txt
Guess what? That # invalidated my hyperlink. I knew that asking people
to not include # in filenames would be futile. So I wrote a routine to
strip out # in filenames and would copy the filename to the newfile name
without #. Then I could do the "Hit Me#Job 123.txt#" for the hyperlink.

Basically, hyperlinks are a modified memo file (read this from Michael
Kaplan) and the # symbol was used to delineate the display text, the
file name, and range. So make sure you aren't using #'s in filenames.

Jul 14 '06 #4
Thanks alot got it. God wasted 4 days to figure it what i was doing
wrong :).
Thanks salad
salad wrote:
su********@gmail.com wrote:
hi salad
Thanks for the reply. well i used the same function for open/save
dialog and then created an onclick procedure for my button :

Private Sub AddaFile_Click()
Me.YourTextBoxName = GetOpenFile(CurrentProject.Path, "Select Source
File")
End Sub

and then i created one more onclick procedure for my textbox which was
something like this:

Private Sub Attachments_Click()
Application.FollowHyperlink (Attachments & "#" & txtLOC & "#")
End Sub

it work fine for me now. came to know that for some reason you need to
have a # sign at the begining and at the end. but i will try tomorrow
the hyperlink function you posted so then i can learn more about it.
Thanks for the reply.
salad wrote:
>su********@gmail.com wrote:

GREAT!

Now here's an issue. I was grabbing info, let's say a subject line, for
the link's display text. Something like
"Progress Report" and the filename was
C:\Test\Job# 123.Txt
Guess what? That # invalidated my hyperlink. I knew that asking people
to not include # in filenames would be futile. So I wrote a routine to
strip out # in filenames and would copy the filename to the newfile name
without #. Then I could do the "Hit Me#Job 123.txt#" for the hyperlink.

Basically, hyperlinks are a modified memo file (read this from Michael
Kaplan) and the # symbol was used to delineate the display text, the
file name, and range. So make sure you aren't using #'s in filenames.
Jul 15 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Marco Krechting | last post by:
Hi All, Sorry but I have to create new message since it cannot find the old message to send a reply. Coming back to this hyperlink thing I will try to explain the real problem cause I think we...
3
by: Kumar | last post by:
Hi Folks, I have a question regarding conditional hyperlink in datagrid. I want to display Hyperlink if my QID values in (1,4,5,6) other wise i want to display just Qdescription with out...
4
by: Lan H. Nguyen | last post by:
I have this line of code in my .aspx page <asp:HyperLink ID="hrefView" CssClass="main" ForeColor="blue" Runat="server" NavigateUrl='<%# "View.aspx?id=" + ID.ToString()%>'>View...
1
by: D. Shane Fowlkes | last post by:
Hello All. I keep asking for help with this on the www.asp.net forums and nobody seems to be able to help. What I'm trying to accomplish is very simple. I simply want to create a Hyperlink...
2
by: AtlasApollo | last post by:
Hi Folks, Can someone please share insight into why this problem is occuring? I've placed a Hyperlink control onto a webform, and when it compiles and runs, there is no HREF generated, and the...
3
by: sloesch | last post by:
I am working with VS.net 2003, framework 1.1, developing with VB.net, and ASP.net, and I would like to know how you can create a dynamic hyperlink on the fly to a document stored in a SQL database?...
3
tdw
by: tdw | last post by:
I have a working hyperlink field in a table, and it's form. I also have a working File Picker Dialog: FileDialog(msoFileDialogFilePicker), being used to create the hyperlink. What I need to do, and...
2
by: =?Utf-8?B?Q2hhcnRz?= | last post by:
I have been writing C# programs to spider yellow page to get list of restaurant name, address to the database. When I encounter button or hyperlink, I don’t know how to use the program to click...
6
by: vspsdca | last post by:
Hi, I'm a newbie here and does not really have any formal training on VBA. I just need help to get my hyperlink to work. I have a form in MS Access with a browse button where a user can select a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.