Form combo-box selection to launch url entries unique to each record (1 Viewer)

MilaK

Registered User.
Local time
Today, 07:02
Joined
Feb 9, 2015
Messages
285
Hello,

Please let me know if it’s possible to accomplish the following in Access 2010.

Table “tbl_Genes” contains a primary field: “GeneID”--Number, “GeneName”--Text and Memo fields: “Cosmic”, “UniProt”, “Google”and “PubMed”” that contain a unique Url for each record. Each gene name is unique as well.

I’ve created a small table “HyperlinkTypes” that consists of all four hyperlink types and a primary key.

On a continues form, for each record I would like to list all four hyperlink types: Cosmic, Uniprot, Google and PubMed inside a combo-box. When the user clicks on desired combo-box item, the corresponding website will launch. I’m not sure how to connect the combo-box to records in “tbl_Genes” table to make this work.

Please suggest how to link selection on the combo-box to urls listed in the tbl_Genes for each record.

Thank you very much,

Mila
 

jdraw

Super Moderator
Staff member
Local time
Today, 10:02
Joined
Jan 23, 2006
Messages
15,362
Can you supply a few sample records? And a brief scenario explaining how the table(s) and the combo would work together?
 

MilaK

Registered User.
Local time
Today, 07:02
Joined
Feb 9, 2015
Messages
285
Please see the attached picture of sample records from tbl_Genes table. The complete table will have up to 30 fields. But this example is fine for what I'm trying to do with hyperlinks. All data will be imported into Access from text files.

A continues form will show all records from tbl_Genes. Instead of having a separate column for each hyperlink I would like to place a combo-box in a column "WebLinks" next to each record with the following choices: "UniProt", "Cosmic", "Google" and "PubMed". When the user clicks on one of the choices it will launch the selected website.

I’m hoping to make the form more compact by consolidating hyperlinks into one combo-box. This form will assist a Molecular Geneticist in review of sequencing data.

Please let me know if you need any additional examples?
tbl_genes.JPG
 

jdraw

Super Moderator
Staff member
Local time
Today, 10:02
Joined
Jan 23, 2006
Messages
15,362
Still not exactly sure what we're looking at. Can you tell us in plain English, as you would tell a 6 yr old, what this represents. Forget the Access jargon for the moment, just a simple description.

I see ID, Genename, 4 hyperlinks and Variant. I have followed one of the links and can see it is technical/medical/chemical info. But I don't yet follow how, for given record, all 4 hyperlinks would be put in a combo.

Put yourself in the user's role, what would be seen in the combo? Is there some reason a Google based link would be distinguished from a Cosmic link? I'm trying to see what/why you don't want a separate control for each hyperlink.
 

MilaK

Registered User.
Local time
Today, 07:02
Joined
Feb 9, 2015
Messages
285
Each hyperlink would take you to a specific website specified by the selected Url. Each Url includes specific search criteria unique to each gene/variant, therefore, url would be a little different for each record.

The dropdown would include each url type: Cosmic, Google, PubMed, and Uniprot. It would not show the full url but just words: Cosmic, PubMed, Google and Uniprot.

I’m trying to save space on the screen by consolidating all hyperlinks into one combo-box. Please let me know if you are able to suggest how to make this work.

p.s. When you right click on a word in Microsoft document you see a submenu of options (e.g. Styles, Look up, Numbering, etc) . I was told it’s not possible in Access, therefore, I was thinking that a combo-box could provide a list of link-outs to websites for each record simular to a submenu.

Perhaps there is a better way to accomplish what I'm looking for?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 22:02
Joined
May 7, 2009
Messages
19,169
you create a combobox using the wizard and type those items (Cosmic, PUbMed, Google, Uniprot).

now on after event of this combobox, write some code:

private sub comboName_afterupdate()
select case me.comboName
case is = "Cosmic"
application.followhyperlink me.cosmic
case is = "PubMed"
application.followhyperlink me.pubmed
case is = "Google"
application.followhyperlink me.google
case is = "UniProt"
application.followhyperlink me.uniprot
End Select
end sub

!!!!!!!!!!!!
ok, sorry for the edit, this is a continuous form. so whatever changes you made to the combo will reflect to all combo in your form (actually there is only one instance of combo) since the combo is unbound.
 
Last edited:

Users who are viewing this thread

Top Bottom