473,395 Members | 1,869 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,395 software developers and data experts.

Application.FollowHyperlink from a chosen item on a list box.

Hi,

I I'm trying to create a form on database that user can choose and adress from a list box then click on a command button and they will be able to open the site. I am not able to retreive the item from the list box, so i may use the Application.FollowHyperlink. Below is code that I am using.


Private Sub Command0_Click()
On Error GoTo Err_Command0_Click
Dim strHttp As String

Screen.PreviousControl.SetFocus

Application.FollowHyperlink List3.Tag, , True

Exit_Command0_Click:


Exit Sub

Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click

End Sub


I've tried a couple of thins and no luck. It seems kinda of simple, but its kicking my @$$.

Any Suggestions.

THANKS
Jun 21 '07 #1
7 7694
FishVal
2,653 Expert 2GB
Hi,

I I'm trying to create a form on database that user can choose and adress from a list box then click on a command button and they will be able to open the site. I am not able to retreive the item from the list box, so i may use the Application.FollowHyperlink. Below is code that I am using.


Private Sub Command0_Click()
On Error GoTo Err_Command0_Click
Dim strHttp As String

Screen.PreviousControl.SetFocus

Application.FollowHyperlink List3.Tag, , True

Exit_Command0_Click:


Exit Sub

Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click

End Sub

I've tried a couple of thins and no luck. It seems kinda of simple, but its kicking my @$$.

Any Suggestions.

THANKS
Hi!

Are you sure that List3.Tag returns hyperlink address?
I mean Tag property is a single property of the whole ListBox control, does your ListBox contain only ONE(???) hyperlink?
If not so please provide structure of the table/query which is the RowSource of List3.
Jun 21 '07 #2
Hi!

Are you sure that List3.Tag returns hyperlink address?
I mean Tag property is a single property of the whole ListBox control, does your ListBox contain only ONE(???) hyperlink?
If not so please provide structure of the table/query which is the RowSource of List3.

Thanks for responding to my post!

I am showing only one field (taken from a table that i created) in my list box, which contains an address. Now I want to click on the field from the list box and with a command button open the site(contained in the field.) The field is from a table in access also. The above code was just me trying to make this happen. I kow how to program in VBA and this would be much easier but I have to do it in Access.

Are you understanding me now?

Thanks
Jun 21 '07 #3
FishVal
2,653 Expert 2GB
Thanks for responding to my post!

I am showing only one field (taken from a table that i created) in my list box, which contains an address. Now I want to click on the field from the list box and with a command button open the site(contained in the field.) The field is from a table in access also. The above code was just me trying to make this happen. I kow how to program in VBA and this would be much easier but I have to do it in Access.

Are you understanding me now?

Thanks
Nice. Its much more certain now.

I was just curious what a special reason do you have for using the ListBox.Tag property.
For your particulary needs you shoud use ListBox.Value property which is default by the way instead of ListBox.Tag one.

Application.FollowHyperLink List3, , True
Jun 21 '07 #4
Nice. Its much more certain now.

I was just curious what a special reason do you have for using the ListBox.Tag property.
For your particulary needs you shoud use ListBox.Value property which is default by the way instead of ListBox.Tag one.

Application.FollowHyperLink List3, , True

Thanks alot.
We're getting somewhere but now the value that is using as a hyperlinlk is the index orcolumn order number. I need it to use the field from the list box that I am clicking.

Thanks
Jun 21 '07 #5
FishVal
2,653 Expert 2GB
Thanks alot.
We're getting somewhere but now the value that is using as a hyperlinlk is the index orcolumn order number. I need it to use the field from the list box that I am clicking.

Thanks
What is your current settings for List3
.RowSourceType
.RowSource
.ControlSource
.BoundColumn
properties.
Jun 21 '07 #6
What is your current settings for List3
.RowSourceType
.RowSource
.ControlSource
.BoundColumn
properties.
The following:

RowSourceType Table/query
.RowSource PC Names
.ControlSource Blank ""
.BoundColumn 1
Jun 21 '07 #7
FishVal
2,653 Expert 2GB
The following:

RowSourceType Table/query
.RowSource PC Names
.ControlSource Blank ""
.BoundColumn 1
"PC Names" --> Use Function1. :) Is it more clear now?
Would you be so kind to be more certain next time?
Anyway you can retrieve value of particular field from current selection in multicolumn ListBox via ListBox.Column property.

Expand|Select|Wrap|Line Numbers
  1. With Me.List3
  2. FollowHyperLink .Column(<ColumnNum>, .ListIndex)
  3. End With
  4.  
Jun 21 '07 #8

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

Similar topics

1
by: Lauren Quantrell | last post by:
I'm using the following code in Access 2000 to open a new MS Internet Explorer window with whatever URL value I pass to myURL: Application.FollowHyperlink myURL, , True (the True opens MS Internet...
2
by: bobdydd | last post by:
Hi Everybody Access 2000, Windows XP Is there any method by which I can pass a value from an Access 2000 form to a web page. I am using Application.FollowHyperlink to open a web page but I...
2
by: AlastairHardwick | last post by:
Hi, Wonder if you can help? I have an Image Management Database which holds various information relating to Ghost Images and Testing. I am using a textbox with a hyperlink to display the path...
3
by: sklett | last post by:
I'm changing from a DataGrid to a DataGridView and have run across a problem. The items that are bound to the DataGrid have an int Property that represents a primary key of a lookup table in my...
1
by: comson | last post by:
I need to send an xml to the doPost method of a url using Application.FollowHyperlink url. Can someone help me with the syntax?
4
by: sam | last post by:
Hi all, Kindly have a look to the code given below ***************************************************************************** Public Function CountFiles(strDir As String, Optional SubDir As...
2
by: BLez007 | last post by:
Has anyone ever come across this problem before, or got any insight as to what may be causing it... I am using application.followhyperlink to open files in a directory from an MS Access form......
3
by: Prashant Mahajan | last post by:
Hi All, I am facing a problem regarding accessing the item list of an XML node in IE. While using the following code: for(test in XMLNode) {} I received this XML Node from AJAX's...
1
by: Zhang Weiwu | last post by:
I know the subject line is really bad. Here is the real question: we have a web application that lists 1200 products. The web page present only 12 products at once, if you wish to see the next 12...
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...
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
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
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
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...

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.