473,397 Members | 2,056 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,397 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 16864
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
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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
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...
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,...
0
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...

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.