VBA weblink no longer works, but did? (1 Viewer)

drazen

Registered User.
Local time
Today, 18:05
Joined
Jan 28, 2016
Messages
31
HI,
I have a button that opens a client file on www.gov.uk website, It takes their VAT number from our access DB and adds it to the URL then opens the web page (a login page appears first, then forwards you on to the page on the URL), simple really.
GOV.uk have just changed their web address of the clients files from
www.gov.uk/vat/trader/'vat-number'
to
www.tax.service.gov.uk/vat/trader/'vat-number'

I've changed the link, but it now bounces to 'you can't view this page'
If I copy and paste the url into google it works fine, but through access it bounces?

This is my code for the Web button

Code:
Private Sub VATx_Click()
Dim ctl As CommandButton
Dim VATNO
VATNO = Replace(vat_no.Value, " ", "")

Set ctl = Me!VATx
    With ctl
        .HyperlinkAddress = "https://www.tax.service.gov.uk/vat/trader/" & VATNO
    End With
End Sub

What am I doing wrong?
Thanks in Advance
 

JHB

Have been here a while
Local time
Today, 19:05
Joined
Jun 17, 2012
Messages
7,732
If I use your code I got a Sign In page, (so I think it works okay by me?)!
 

drazen

Registered User.
Local time
Today, 18:05
Joined
Jan 28, 2016
Messages
31
Thanks crazy, Thanks for trying, we have 6 computers on a network here, none of them work. But be something at our end

Thank again.
 

JHB

Have been here a while
Local time
Today, 19:05
Joined
Jun 17, 2012
Messages
7,732
Have you checked the "HyperLinkAddress" property for the control "VATx" just when you open the form.?
Else I would suggest to create a label and set the "HyperLinkAddress" to the address you want.
 

Users who are viewing this thread

Top Bottom