Updating Hyperlink Addresses in VBA (MS Access)
Hi,
Me.txtgroundFloorPlan100.Visible =True
Me.txtgroundFloorPlan100.SetFocus
groundFloorPlan100 =Me.txtgroundFloorPlan100.Text
Me.cmdRefresh.SetFocus
Me.txtgroundFloorPlan100.Visible =False
Me.lblgroundFloorPlan100.HyperlinkAddress = groundFloorPlan100
IfMe.lblgroundFloorPlan100.HyperlinkAddress = ""Then
Me.lblgroundFloorPlan100.ForeColor = RGB(204, 204, 204)
Me.lblgroundFloorPlan100.ControlTipText = "Drawing Unavailble"
Else
Me.lblgroundFloorPlan100.ForeColor = RGB(0, 0, 255)
Me.lblgroundFloorPlan100.FontUnderline =True
Me.lblgroundFloorPlan100.ControlTipText = "Clickto open drawing"
EndIf
I have added navigation buttons onto the form and have added this code to them also:
Me.txtgroundFloorPlan100.Visible =True
Me.txtgroundFloorPlan100.SetFocus
groundFloorPlan100 =Me.txtgroundFloorPlan100.Text
Me.cmdRefresh.SetFocus
Me.txtgroundFloorPlan100.Visible =False
Me.lblgroundFloorPlan100.HyperlinkAddress = ""
Me.lblgroundFloorPlan100.HyperlinkAddress = groundFloorPlan100
IfMe.lblgroundFloorPlan100.HyperlinkAddress = ""Then
Me.lblgroundFloorPlan100.ForeColor = RGB(204, 204, 204)
Me.lblgroundFloorPlan100.ControlTipText = "Drawing Unavailble"
Else
Me.lblgroundFloorPlan100.ForeColor = RGB(0, 0, 255)
Me.lblgroundFloorPlan100.FontUnderline =True
Me.lblgroundFloorPlan100.ControlTipText = "Clickto open drawing"
EndIf
The problem is that the Hyperlink address doesn’t update, it links to the path in the first record.
Can anybody help?
Thanks

