From: AndyT on 28 Jan 2010 12:05 On Jan 28, 11:27 am, Salad <sa...(a)oilandvinegar.com> wrote: > Marco Pagliero wrote: > > On 28 Jan., 14:13, AndyT wrote: > > >>On Jan 24, 12:20 am, AndyT wrote: > > >>>I am new to programming with Access 2007. I have created a database > >>>for purchased items for the home. I have a store address text box on > >>>the entry form. Some of the stores are actually web sites. I would > >>>like to have the web addresses ONLY, appear as hyperlinks on the forms > >>>and reports. It seems that using the "ishyperlink" property is an all > >>>or nothing proposition. Is there a simple way to accomplish this task? > > >>I assume that their are no simple answers. I was at least hoping for > >>some reply / criticism. > > > No, as Keith says, I just didn't understand what you need. > > > But one possibility is to put everything, adresses and links, in one > > table field, datatype = text. In the relevant _format event of the > > report you can test for instance whether in the text "http" is > > present, and if yes, set ishyperlink = true, if not, set ishyperlink = > > false. > > > if instr$(TblField,"http") then RptField.ishyperlink = true else > > RptField.ishyperlink = false > > > TblField is your value/column from the table, RptField your field in > > the report. In most reports they are identical (but sometime this > > means troubles). > > > According to the access-help it could work, but I didn't try it > > myself. > > > Greetings > > Marco P > > Expanding on your reply...from the immediate window I entered the following. > > x = "Some Store#www.somestore.com" > ? hyperlinkpart(x,acAddress)www.somestore.com > ? hyperlinkpart(x,acDisplayText) > Some Store > ? hyperlinkpart(x,acDisplayedValue) > Some Store > ? hyperlinkpart(x,acFullAddress)www.somestore.com > ? acaddress > 2 > ? acDisplayText > 1 > ? acdisplayedValue > 0 > ? acFullAddress > 5 > > In a form or report on can use the "ac" values. In a query, the value > of the "ac" variable. A hyperlink is composed of 4 parts; the displayed > value, the address, the subaddress, and control-tip text. Each part is > separated by a #. > > One could have > x= "SomeStore" > ? hyperlinkpart(x,acDisplayText) > SomeStore > ? hyperlinkpart(x,acAddress) > <blank/ > x= "#www.somestore.com" > ? hyperlinkpart(x,acDisplayText) > <blank> > ? hyperlinkpart(x,acAddress)www.somestore.com. > > One can create a hyperlink by placing a # between each part. One can > use acDisplayedValue to for the value the is displayed since certain > parts of an address may be missing.- Hide quoted text - > > - Show quoted text - Excellent! Thank you for your suggestions! I apologize for my lack of clarity. You hit it on the head. I will get right on these suggestions.
First
|
Prev
|
Pages: 1 2 Prev: Combo box After Update won't update the recordset/table Next: VBA Disappeared Access 2007 |