473,396 Members | 2,034 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,396 software developers and data experts.

How do I create a hyperlink button on a form?

I'm trying to create a hyperlink button on a form that does the following:

1. User clicks on button
2. The default 'insert hyperlink' window appears
3. User selects the desired file
4. User clicks ok
5. Path of the file comes in the textbox

A button is needed for each textbox that requires a hyperlink. Is this possible? (Note: I'm a beginner with no programming experience and this is my first database.)
Oct 11 '07 #1
5 16861
I found this code to work great for what I needed. First you need to create a button then point it to this code.

Private Sub browse_Click()

Me.[Hyperlink].SetFocus
On Error GoTo browse_stop
RunCommand acCmdInsertHyperlink
browse_stop:

End Sub

This works exactly how you explained you needed.
Oct 11 '07 #2
I tried the code and got this error:

Run-time error '2465':

System can't find the field 'I' referred to in your expression.

How can I fix this?
Oct 11 '07 #3
I'm sorry, in the code:

Private Sub browse_Click()

Me.[your_location].SetFocus
On Error GoTo browse_stop
RunCommand acCmdInsertHyperlink
browse_stop:

End Sub

In your_location, put where you want the link to show up at. My location was called "Hyperlink".
Oct 11 '07 #4
Exactly what I wanted. Thanks man.You have no idea how much you've helped me with your posts.
Oct 11 '07 #5
No problem, I get help I try to help.
Oct 11 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Stu | last post by:
Hi, I've been looking through the archives but can't find what I'm looking for, or due to my limited experience with Access97, didn't recognize it... I've created a database that is going to be...
2
by: Ingeborg | last post by:
Hi. I want to insert an hyperlink/button for loading another page, but I need to store some data in this operation too, but I don't think the HyperLink web control has a "onclick" event, and I...
2
by: SaT | last post by:
Does anyone know how to create hyperlink labels within a datagrid, on the fly? Thanks SaT
4
by: Adam - Regus | last post by:
I'm trying to create a button that prints 2 copies of a form. Using the wizard, I created a button that prints one automatically, using the following code: End Sub Private Sub...
3
by: oozy | last post by:
Hi, I'm currently using Page.Form.DefaultButton = ChangePassword1.FindControl("xx").UniqueID to set my DefaultButtons in a form that has multiple wizards(each in it's own panel). I can...
2
by: peterv6 | last post by:
I want to create a button on my page that when clicked, will take me to my homepage. Using just a link on the page works <a href="index.html">Main Page</a , but I want to use a button. ...
5
by: theine | last post by:
How do I create Hyperlink based of a specific field in the same row? In Excel it done like this: =HYPERLINK("", A273) where the anything inside the " " is the value it's looking for in that...
1
by: simonyong | last post by:
Hi, I have a hyperlinkbutton in my datagrid Initially, I set the text of the hyperlink button as "show" once user click it, i want it to change into "view more detail" I tried to change...
6
by: mercout | last post by:
Hey, I've been trying to create a search form in access for a while now, searching through books and emails. I have the search form set up with 11 combo box's, 3 text box's, a view button, and a...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...

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.