Results 1 to 4 of 4
  1. #1
    ksor's Avatar
    ksor is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Feb 2017
    Posts
    126

    Bring the Access-window to the front ??


    The LONG story:

    I have some communication between Excel and Acces going on when the user dobble-clickks on ONE of many shapes on a timeline in Excel.

    The shape in Excel represents an EVENT filed in Access and the result of the dobble-click in Excel is Access showing that EVENT in a form.

    It works nicely, no problem here !

    In Access the event have a word document assigned to it - just as a file - no BLOB ext ext involved ... pure simple solution ... and it's working nicely !

    A checkbox named "chbPrivat" in the event form can MARK the word document as PRIVATE and then the user can't open the document in ACCESS unless he knows the password.

    Of cause he should ALSO be prevented from opening it from Excel.

    I use this code in Access CALLED from Excel:

    Code:
    Public Sub getDocument()       ' called FROM Excel when an event is dobble-clicked on my timeline in Excel
        If chbPrivat = False Then
            Sti_til_fil.SetFocus
            Sti_til_fil_DblClick False
        Else
            SetForegroundWindow hWndAccessApp
            Meld ("Dette dokument er markeret som 'Privat'," & CrLf(1) & _
                 "og kan dermed ikke åbnes fra tidslinien !")
        End If
    End Sub
    If the "chBPrivat" is false then I set focus the the field with the filename and perform a dobble-click to show the word document in Word - this works nicely both from within Access AND from within Excel - no problem here !

    The SHORT story:

    The 'Else ... End If ' part is ONLY used when the document related to the event is marked as PRIVATE - the user should then be informed that it's private.

    I do that in Access (because all the data and code is there !) so I have to FORCE Access in FRONT and then show my messagebox ('Meld' is just my very simplified MsgBox !)

    The problem is Access will NOT come to the front !

    When the user dobble-clicks on an event in Excel (with a private marked document in Access) the cursor changes to that "light blue spinning circle = wait a while" and I MYSELF HAVE to shift to Access to see the msgbox !

    What is wrong here and what can I do to cure it ?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,900
    I faced this issue once and gave up. None of my research encountered a solution. It's one reason I eliminated Excel as frontend user interface.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    ksor's Avatar
    ksor is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Feb 2017
    Posts
    126
    Quote Originally Posted by June7 View Post
    I faced this issue once and gave up. None of my research encountered a solution. It's one reason I eliminated Excel as frontend user interface.
    That's a dramatic decision because of that , I think ... but it's your choice ...

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,900
    Yes it was, but in this case using Excel as interface was bad decision to begin with (inherited incomplete db). The issue of Access not coming to front was the last straw.

    I have seen this topic in forums but cannot remember if solved.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 10
    Last Post: 12-05-2017, 01:14 AM
  2. Access 2016 won't bring up front end
    By EScottHug in forum Access
    Replies: 1
    Last Post: 06-29-2016, 03:02 PM
  3. Replies: 2
    Last Post: 12-23-2015, 09:32 PM
  4. Text box width/bring to front and Checkbox
    By SorenIX in forum Programming
    Replies: 16
    Last Post: 06-22-2011, 06:07 PM
  5. Replies: 2
    Last Post: 03-28-2010, 04:15 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums