Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Jun 2001
    Kenton, Delaware, USA
    Thanked 0 Times in 0 Posts

    Hyperlinks (2000)

    I often include a hyperlink to another file maybe a Word Document on my end user menus. The problem is that when the hyperlinked file opens it minimizes the current dB. This confuses the end users who, after closing the hyperlinked file, don't know to look on the status bar to restore the menu they were at. They then reopen the dB and end up having several instances of the dB open at one time. Does anyone know of some small bit of code that would keep the active form/menu window "onscreen" in the background so that when the hyperlinked file closes the end user menu is up on the screen ready for the next command? I don't want to add any code to the hyperlinked files since the dB are not the only users of the hyperlinked file.

  2. #2
    3 Star Lounger
    Join Date
    Jan 2001
    San Francisco, California, USA
    Thanked 0 Times in 0 Posts

    Re: Hyperlinks (2000)

    You could simply add code to your database on open that checks to see if the database is already open, and if it is, just maximize the database that is open.

    Function isFileOpen(strFileName As String) As Boolean
    On Error Resume Next
    Dim intFileNumber As Integer
    Dim intErr As Integer

    intFileNumber = FreeFile()
    Open strFileName For Input Lock Read As #intFileNumber
    Close intFileNumber
    intErr = Err

    On Error GoTo 0
    If intErr=0 Then
    isFileOpen = False
    Call Shell(strFileName, 1)
    Exit Function
    isFileOpen = True
    AppActivate strFileName
    Exit Function
    End Select
    End Function

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts