473,769 Members | 5,862 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6488
su********@gmai l.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.YourTextBoxN ame = GetOpenFile(Cur rentProject.Pat h, "Select Source
File")
End Sub

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

Private Sub Attachments_Cli ck()
Application.Fol lowHyperlink (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********@gmai l.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********@gmai l.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.YourTextBoxN ame = GetOpenFile(Cur rentProject.Pat h, "Select Source
File")
End Sub

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

Private Sub Attachments_Cli ck()
Application.Fol lowHyperlink (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********@gm ail.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********@gmai l.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.YourTextBoxN ame = GetOpenFile(Cur rentProject.Pat h, "Select Source
File")
End Sub

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

Private Sub Attachments_Cli ck()
Application.Fol lowHyperlink (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********@gma il.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
4395
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 are going in circles. I have a continous form with a hyperlink field on it. Normally when you click on a hyperlink field Access will follow the Hyperlinkbase set in the database. This is for example in my case "I:\". However I have two different
3
2603
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 hyperlink. <asp:hyperlinkcolumn headertext="Question" SortExpression="QDescription" datatextfield="QDescription"
4
9354
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 Customer</asp:HyperLink> But when the page runs it shows text only "View Customer" without hyperlink. This is what it was rendered in the page source <a id="hrefView" class="main" style="color:Blue;">View Customer</a>
1
1866
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 Column in a Datagrid and reformat the text output of the column. The helper function seems to be working but the hyperlink column isn't properly being render into html. The actual hyperlink web control is showing up in the html when tested on two...
2
1505
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 link is in effect unusable. ASP.Net source: <asp:HyperLink id="Print" runat="server" NavigateURL='<%# "PrintResumeDetail.aspx?ResumeID=" + Request.Params.Get("ResumeID") %>' CssClass="btn">Print</asp:HyperLink>
3
12364
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? I would like to create a VB.net function that would do this, and I found this class *System.Web.UI.WebControls.HyperLink*, but I can not find any examples on generate a dynamic hyperlink. Basically, I want my function to generate an embedded...
3
2432
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 can't figure out how, is to have the dialog pick a folder, not a file within it. I need the hyperlink to open the folder so the user can then select a file within it to open. Right now, when navigating in the file picker dialog, clicking on the...
2
3434
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 the button or hyperlink. Does anyone have this type of sample code in either C#, vb.net? Thanks, Charts
6
5675
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 folder from a specified directory from our network. I was able to get the browse button working where it saves a path that is selected onto the textbox that is set as hyperlink. The problem appears when you click on the hyperlink... it will work a few...
0
9579
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9416
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10199
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10032
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9849
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8861
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7393
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5293
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5433
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.