From: AndyT on 24 Jan 2010 00:20 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?
From: AndyT on 28 Jan 2010 08:13 On Jan 24, 12:20 am, AndyT <ato...(a)cox.net> 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.
From: Keith Wilby on 28 Jan 2010 08:27 "AndyT" <atofil(a)cox.net> wrote in message news:bb497662-ca18-44e7-ad86-3a7a10fc4987(a)w27g2000pre.googlegroups.com... On Jan 24, 12:20 am, AndyT <ato...(a)cox.net> 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? It might be that no-one has replied because the question isn't clear. Are you saying that you have a dual purpose field for postal address and web address? If so then you need two dedicated fields for each address and then use an "IIF" function in a query to return the populated field. Keith. www.keithwilby.co.uk
From: Marco Pagliero on 28 Jan 2010 10:32 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
From: Salad on 28 Jan 2010 11:27 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.
|
Next
|
Last
Pages: 1 2 Prev: Combo box After Update won't update the recordset/table Next: VBA Disappeared Access 2007 |