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

Hyperlink query

I hope I can make this clear. I have a combo box that allows the user to query an IP address. They type in an IP address and the results are returned via a form that allows them to click on the IP address in a box and go to that printers web page. The problem is on the table where the query is based from, in the hyperlink column, I entered in the respective IP addresses and enabled the hyperlink for the column. However if the user enters in the IP address (i.e. 10.11.10.11) in the query, it comes back as no results. The reason is that the table's hyperlink now reads: 10.11.10.11#http://10.11.10.11# I can't expect the user to type in all the additional characters to get a proper result. Is there any way to get around this? I am a self-taught novice so be gentle...
Thanks!
May 23 '07 #1
1 2430
Hi there...
I have done something similar to this using macros. I'm sure there are ways to do this with only a script... but. This is what i have to offer, and it is really much more simple than its steps make it seem.
---------------------------------------------
I'm making a couple of assumptions below...
1. User selects an IP address from a combobox named "COMBONAME"
2. User clicks on a separate object to pull up printers website.
3. The hyperlink can be created live, (hyperlink is not stored).
4. Form name is "FORMNAME" , label is named "link"
5. Macro name is "MACRONAME"
---------------------------------------------
In the form with your combobox, create an unbound label near the combobox the user will select the IP address in. Have it's caption say "Go to printer" or something... we're naming this label link in its properties. Also in its properties, set "is hyperlink" to yes but leave "hyperlinkaddress" blank. Save the form.
----------------------------------------------
Create a new macro and title it MACRONAME
Have the first action set to "SetValue"
In the properties for SetValue input the following into the Item information
[Forms]![FORMNAME]![link].[HyperlinkAddress]
([HyperlinkAddress] isn't something you need to change the name of... its the aspect of the label "link".
In the properties for SetValue input the following into the Expression information
"http://" & [COMBONAME]
Save macro.
----------------------------------------------
Now, in your form insert the following code in the form properties in the appropriate place. Here I'm assuming I want Form_Current, I'll leave it up to you to find the right place.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Current()
  2. On Error GoTo Err_Form_Current
  3.  
  4.     Dim stDocName As String
  5.  
  6.     stDocName = "MACRONAME"
  7.     DoCmd.RunMacro stDocName
  8.  
  9. Exit_Form_Current:
  10.     Exit Sub
  11.  
  12. Err_Form_Current:
  13.     MsgBox Err.Description
  14.     Resume Exit_Form_Current
  15. End Sub 
---------------------------------------------------
---------------------------------------------------
I hope this was clear, I've been a bit distracted while writing. Let me if you have questions or can't figure out what I mean... Or also if you get it to work :) For me, this allowed my user to select an IP address from my combobox, and immediately click on a label next to the combo box, and it brings up the ip address with http:// in front, in their default browser.

theAybaras.
May 24 '07 #2

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

Similar topics

4
by: Andreas Meffert | last post by:
Hello, How can I change the Type of a field in a table from Memo to hyperlink? I import a table from Oracle to Access 2003. After that, the field type of some hyperlink-fields is "Memo". How...
5
by: Gamesetal | last post by:
Have '97 and am trying to create a query on the underlying Hyperlink field - ie if xxx then else ... Can't find a way to do this and would very much appreciate some kind help - thanks - John
10
by: hecsan07 | last post by:
I am a novice programmer. I want to have a hyperlink that looks like so: www.mycoolsite.com?a=21132. On click I want to extract the query string and use it to query a table within a DB (SQL...
6
by: epigram | last post by:
I'm using the DataGrid with AutoGenerateColumns set to false and choosing which columns I want in the grid by using the <Columns> attribute. What I want to do is to create a hyperlink out of one...
4
by: wrytat | last post by:
I have a form with a textbox for the user to enter a quantity and another textbox for the delivery date. I disabled this delivery date textbox such that the user has to press a calendar link next...
7
by: Bob Sanderson | last post by:
I have a php page which contains the code: echo "<tr>"; echo "<th>$JobNumber</th>"; echo "<td>$Description</td>"; echo "<td>$NSN</td>"; echo "<td>$Manufacturer</td>"; echo...
0
by: shaqattack1992-newsgroups | last post by:
I have a table with a hyperlink field pointing to an Excel file that I would like to automatically print out on a report form. For example, I have a table: Part--------Drawing(hyperlink field)...
1
by: mramsay | last post by:
Hi there, I have a dynamic hyperlink Baseball. When the user select the hyperlink they are redirected to another page. After that I want to display information on the page from my linkstbl. ...
5
LAD
by: LAD | last post by:
Using Access 2003 on Windows 2000. My Skill Level: Med Low (Some VBA, okay with Access) Form: Single View - based on Query of single Table to sort by field. Application: Dealers email 'contract...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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,...

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.