Individual Hyperlinks.

Y

yorkielover02

I have a table titled stores that has a column for individual hyperlinks. Can
I create a button on the form that will go to each individual hyperlink. I DO
NOT want to go to the same hyperlink...each store has it's own. Is there a
way to do this?
 
S

S.Clark

Assuming your form is displaying a single store record at a time...

suppose your field is called txtStoreURL. In the onclick for the button,
you could Shell to IE and add the URL.

e.g. Shell "IExplore.exe " & txtStoreURL
 
Y

yorkielover02

I'm sorry but I'm not following.

S.Clark said:
Assuming your form is displaying a single store record at a time...

suppose your field is called txtStoreURL. In the onclick for the button,
you could Shell to IE and add the URL.

e.g. Shell "IExplore.exe " & txtStoreURL
 
S

S.Clark

You asked, "Can I create a button on the form that will go to each individual
hyperlink."

a. Have you made the form or did you use the word "form" to mean something
else?
If you made a form:
b. Does it show one record from the table or all records from the table at
once?
c. Did you create a button?
 
Y

yorkielover02

I have made a "form" and that is what I am wanting to put my hyperlinks on. I
can put individual hyperlinks on each form as I put the links in the attached
table, but what i woud like to do is make a button so the operator can not
see/copy&paste/etc the hyperlink.Like a nice pretty button that will take you
to the individual links. I can make a button but up to this point all I can
do is put in one main hyperlink not individual ones. any suggestions? Thanks
for the help by the way.
 
S

S.Clark

Ok, let's focus on some semantics, such that we can speak the same language.

1. You have a database (Store.mdb/accdb) containing info about stores.
2. Your database contains a table of stores. I'll assume it is called
[tblStore].
3. Your table contains a column(field) with the datatype of 'Hyperlink'.
I'll assume the column name is [StoreURL].
4. Your form, assuming [frmStore],
a. has a 'recordsource', which is the table [tblStore]
b. displays the StoreURL data in a textbox.
c. displays only one store record (row of data) at a time.
d. contains a button, called cmdStoreURL_View

In the design view of the form, view the properties window for the button.
Locate the Event Property called 'On Click'. Use the dropdown arrow to select
[Event Procedure] then click on the period of ellipses (...) to open the
Module Window.

Assuming you've named the button properly, you would see:
Private Sub cmdStoreURL_View_Click()

End Sub

In between those two lines, add:

Shell "C:\Program Files\Internet Explorer\IExplore.exe " & txtStoreURL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top