473,721 Members | 2,186 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

List boxes and buttons, a great combo!

25 New Member
Hello everyone,

I've been working on this for a bit and wonder if anyone can shed some light on my situation. My ultimate goal is to have a user select an item in a list box, have one column in the list box display in either a text box or preferrably a button based on what is selected. The form is being used currently as a rudimentary document retrieval system. The document that is saved on a shared drive is linked in a table by a hyperlink, each document is saved for a specific person. I have it set up now where the user types in the persons name in a combo box, when they tab out of the box 4 columns appear in the list box from a query based on the name in the cmbbox, the 5th column not showing in the listbox is the hyperlink. I would like it be where the user will click on the row of the document they'd like to open, and preferrably have the button take them to the document via a hyperlink once pressed. I'm not sure if this is possible through a button. Or, a text box would work fine. I have been able to get the text box to populate the hyperlink with afterupdate in the list box, but it doesn't display the Text link that is set up in the table, only the location. I am extremely new to Access, but do somewhat understand queries, relationships and some of the code. Any help would be EXTREMELY appreciated, so far it's been trial and error, and I've been racking my brain and google on this one. Below are the names of the objects being used in the form currently:

Combo box where persons name is entered: cmb_cmdoc
List box where info from query displays, column the hyperlink is in is (5): lstDoc
Button I'd like to open link based on item selected in listbox: btn_docsearch
Text box that now displays link, but not in link format: txtDoc

Thanks again!!
Feb 6 '08 #1
7 1711
Minion
108 Recognized Expert New Member
Sorry I don't have more time at the moment to delve into this with you, but I did find something that may help in the mean time. For the text box you have displaying the hyperlink make sure that under format on the properties tab (last on one list) the property Is Hyperlink is set to "True" this should let the hyperlinks work if they are stored as hyperlinks in the table.

Hope this helps.

- Minion -
Feb 6 '08 #2
Clamato
25 New Member
Thanks Minion, I appreciate the help. I changed the option to yes for is hyperlink and it appears to be doing the same thing as before, except now the text is in blue as if it were a hyperlink and showing the full location address as opposed to the display text as it is in the table. But, still not in hyperlink format. :/
Feb 6 '08 #3
Minion
108 Recognized Expert New Member
I did a quick test and think I've found your problem. Goto the design of your table and make sure the field type is set to "Hyperlink" instead of "Text". If it's not set to a hyperlink Access seems to ignore it despite the form telling it is a hyperlink. Once this is set the text in table view should be blue underlined just like you'd expect.

Hope this helps.

- Minion -
Feb 6 '08 #4
Clamato
25 New Member
Thanks again Minion,

I do have the field in the table set as hyperlink as well. I wonder if it's the way the information is being passed to the text box. I have now on the list box where the user clicks the row they'd like to view and the column containing the link is passed to the text box as follows with an afterupdate:

Me![txtDoc] = Me![lstDoc].Column(4)

I think I'm really close to getting it to work with a button, I've added this on the button. I think my syntax may be a little askew:

Application.Fol lowhyperlink Me![lstDoc].Column(4)

When I press the button it gives a hyperlink warning, but an error afterwords. What do you think?

Thanks!
Feb 6 '08 #5
Clamato
25 New Member
Alright, I got the button to work. I had to change the format of the hyperlink though, which means going through 150+ records and updating them :(

I think it may have had something to do with the "display text" in the link format, not sure why though. When I changed that to match the actual location I had the path display in the text box. Then I used

Expand|Select|Wrap|Line Numbers
  1. Private Sub btn_open_Click()
  2. On Error GoTo Err_btn_open_Click
  3.  
  4.     Dim stlink As String
  5.         stlink = Me![txtDoc]
  6.         FollowHyperlink stlink, , True
  7.  
  8. Exit_btn_open_Click:
  9.     Exit Sub
  10.  
  11. Err_btn_open_Click:
  12.     MsgBox Err.Description
  13.     Resume Exit_btn_open_Click
  14. End Sub
  15.  
on the button, so it's taking the string in the textbox as the link. GEESH! I have a lot of changing to do! Thanks for the help again Minion
Feb 6 '08 #6
MMcCarthy
14,534 Recognized Expert Moderator MVP
I believe you need to include display text to get a hyperlink to work consistently. Not sure why, probably just an MS bug.
Feb 6 '08 #7
Minion
108 Recognized Expert New Member
Glad that you go a least a part of it working. If you post a new thread with some of the details on what you have and what it has to be changed to I think we can come up with a quick script to help you out.

- Minion -

Alright, I got the button to work. I had to change the format of the hyperlink though, which means going through 150+ records and updating them :(

I think it may have had something to do with the "display text" in the link format, not sure why though. When I changed that to match the actual location I had the path display in the text box. Then I used

Expand|Select|Wrap|Line Numbers
  1. Private Sub btn_open_Click()
  2. On Error GoTo Err_btn_open_Click
  3.  
  4.     Dim stlink As String
  5.         stlink = Me![txtDoc]
  6.         FollowHyperlink stlink, , True
  7.  
  8. Exit_btn_open_Click:
  9.     Exit Sub
  10.  
  11. Err_btn_open_Click:
  12.     MsgBox Err.Description
  13.     Resume Exit_btn_open_Click
  14. End Sub
  15.  
on the button, so it's taking the string in the textbox as the link. GEESH! I have a lot of changing to do! Thanks for the help again Minion
Feb 7 '08 #8

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

Similar topics

2
10625
by: Brian | last post by:
Hope you all had a great holiday. I have a subform with a table with a combo box based on a select query. The combo box is set to display in a form in datasheet view. When I click the down arrow I can see all of the columns in the combo box but it only shows one column after selecting it. I would like all of the columns to display when an item in the list is selected. Is this possible?
2
1610
by: CSDunn | last post by:
Hello, In an Access 2000 ADP subform, I have a set of two Radio buttons in a single group that are bound to a field called 'Completed'. The Completed field comes from an SQL Server 2000 table, is of type Bit (so it takes 0 or 1). I need to set up a procedure so that when the radio button has a value of 1, a series of combo boxes in the Detail section of the subform have the Locked property set to Yes. If the value is zero, the Locked...
1
1223
by: hartman | last post by:
I have seen things to link list boxes and/or combo boxes to forms such that when you select an item in the list (or combo) box the form moves to the matching record. One example (by Allen Browne) is here: Using a Combo Box to Find Records http://allenbrowne.com/ser-03.html What I have not seen is the reverse: when you use the form's record navigation buttons to go to the next or previous record, how do you
9
15844
by: natwong | last post by:
Hi All, I'm a newbie in terms of Access and some of its functionality . I've been stuck on this problem for a couple days, even after searching the Web, etc. Currently I have five combo boxes (actually list boxes) that are multiselects in my main form. I need to use these combo boxes to filter a subform within my main form. My combo boxes are as follows: 1. A - 4 select options 2. B - 10 select options 3. C - 4 select options
2
7135
by: saurabhnsit2002 | last post by:
Can anyone help me about how to create combo box with its items as checked boxes or radio buttons. This has to be done in C#. I have seen something similar to this named custom combo boxes but they are in MFC I have to remain constrained only in C#. I have tried to add checked listbox in combobox drop down list but it is showing in text format i.e. name of the control added, if I change display property of combobox with some property of...
1
6440
by: favor08 | last post by:
I need help with a big project. I am struggle getting multiple option buttons and filters to work together. They need to be able to filter a subform. My first set of option buttons work fine all past due demand fax and my combo boxes work fine opid prodcd
4
64624
Rabbit
by: Rabbit | last post by:
Cascading Combo/List Boxes This tutorial is to guide you in the creation of Cascading combo/list boxes. That is when you have multiple combo/list boxes where the selection of an option in one determines the available options in the other. TERMINOLOGY Row Source: The table/query from which the Combo Box or List Box gets its values. Note: There are other types of row sources that can be used but for simplicity we will stick with Tables...
2
2252
by: RhysPhelps | last post by:
hi guys and girls, What i have is a list of account codes, and a list of cost centres. Each combination of these (so for example "5030" and "Externals") will have it's own budget reference sperate form another (so 5030 externals would have a different budget from 5030 software etc) i have a form ("Form1") that has two combo boxes ("Cost" and "Account") that i would like to use to populate the list box ("Ref"). The table is "BudgetRef" I...
0
8840
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
8730
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
9367
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
9064
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...
1
6669
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4484
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3189
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
2576
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2130
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.