Stuart McLachlan
stuart at lexacorp.com.pg
Fri Jun 19 06:35:41 CDT 2009
Just played around with this a bit more. If you set the HyperlinkAddress of the inner label to a single space, the mouse pointer changes to a hand when over the label so you get the full "hyperlink experience" -- Stuart On 19 Jun 2009 at 21:00, Stuart McLachlan wrote: > You can use a label, format the text any way that you want and use its on_click event. > > If you want the link to change its appearance when you mouse over it (such as to change its > colour, make it underlined or whatever) you need to use two superimposed labels and the > MouseMove event. > > Create two labels, one slightly larger than the other. > Make the caption of the larger one empty > Put your link text in the smaller one (and colour it appropriately if so desired( > . > Make sure that the larger one is lower in the Z Order (create it first and/or use Format - > Send to back) > Centre the smaller label in the larger one so that there is an overlap all round. > > Then use the following event procedures: > (lblURL is the smaller label and lblURLClear is the larger one) > > Private Sub lblURL_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As > Single) > lblURL.FontUnderline = True > End Sub > > Private Sub lblURL_Click() > DoCmd.OpenForm "frmLinkedForm" > End Sub > > Private Sub lblURLClear_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As > Single) > lblURL.FontUnderline = False > End Sub > > -- > Stuart > > On 19 Jun 2009 at 6:28, Arthur Fuller wrote: > > > I'm sure I've done this but I cannot remember how and I can't find it in the > > list of controls. I thought that I could create a control that looks and > > acts like a typical web page reference to another page. In this case when > > it's clicked I want to open a form. I suppose I could use a button control, > > but I was sure there was another way. This is Access 2003. > > > > TIA, > > Arthur > > -- > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com