Active IE Window

tfaiers

Registered User.
Local time
Today, 11:25
Joined
Apr 26, 2002
Messages
54
I have a database that has links to pages behind a password protected website.

If you login to the website and enter your username and password so that the session is authorised the hyperlink in the access database has no problems opening.

For some strange reason, I've been experiencing the following problem:

Depending on the order in which you open the access database and internet explorer (and logon) you either get the protected web page OR you get a complete new IE session and you are refused entry, ie. access does not utilise the currently open internet explorer session.

Is there any way to force Access to open its hyperlinks in an already open internet explorer window rather than starting a new session?
 
You need to use the AppActivate statement. This code will test if the calculator
is already open, if true it will set the focus to it, if false then it will open the
calc.exe program.
Code:
Public Function OpenCalculator_Click()
On Error GoTo Err_OpenCalculator_Click
    
    AppActivate "Calculator", False 'Programs Title Bar Name
    
Exit_OpenCalculator_Click:
    Exit Function
    
Err_OpenCalculator_Click:
    If Err.Number = 5 Then 'Invalid procedure call or argument
        Call Shell("C:\Windows\System32\calc.exe", vbNormalFocus)
    Else
        MsgBox Err.Number & " - " & Err.Description
        Resume Exit_OpenCalculator_Click
    End If
    
End Function
HTH
 
That works fine, although I would now like to do the following:

After Access checks to make sure that the IE application is running and logged on within the protected web page, I need it to activate (appactivate) IE

AND

Open the hyperlink to the page within the protected area. In short terms....
Check for active IE session, open hyperlink in active session.

Your method works fine, but it only seems to set the focus to the IE session, how can I make it then go the the right web page?

Hope you can help,

Cheers for the help so far.
 

Users who are viewing this thread

Back
Top Bottom