473,669 Members | 2,414 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hyperlink query

1 New Member
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#htt p://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 2447
theaybaras
52 New Member
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 "hyperlinkaddre ss" 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].[HyperlinkAddres s]
([HyperlinkAddres s] 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
7531
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 can I schwitch back to Hyperlink via VBA because its boring doing it manually often (I import the table each week for doing updates). When I do it manually the hyperlink works well. Thanks in advance.
5
5859
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
1796
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 Server). The stored procedure takes the query string as a parameter and returns the actual URL the page is going to be redirectted. I can do this using a button, but I have done little work with ASP.NET hyperlinks. I've never used a link to query a DB...
6
2940
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 of the columns that I am displaying, but in order to build this link, I need a value that is in my SELECT clause, but is not being displayed via a BoundColumn. Say I have a query: SELECT ID, Name FROM Companies Here, ID is the PK. I am only...
4
5817
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 to the textbox, then a calendar will pop up for him to choose the date. The dates that the user can pick depends a lot on the quantity that he enters in the quantity field. Is there any way that I can parse the quantity field to the calendar page...
7
11712
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 "<td>$PartNumber</td>"; echo "</tr>";
0
2045
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) --------------------------------------------------------------------------------------- Part1------\\sharedrive\drawings\part1excelfile.xls(hyperlink) Part2------\\sharedrive\drawings\part2excelfile.xls(hyperlink)...
1
1745
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. The information I want to display is Baseball and some text I have entered in the database. I'm having a problem displaying the two fields for Baseball. The two field names are linkdescription and text. How do I get my sql query to pull out the...
5
8803
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 packages' that include as attachments: a contract (PDF or TIF), a pricing tool (Excel), a companion document (Word). Clerks detach these files into a shared drive file on our intranet. I'm building an 'contract package management' application...
0
8465
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8383
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8894
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8803
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8587
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8658
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4384
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2792
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2029
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.