Results 1 to 8 of 8
  1. #1
    charly.csh is offline Competent Performer
    Windows 11 Office 365
    Join Date
    Nov 2014
    Posts
    186

    Report is not shown despite I have property modal and emerge as Yes

    Hello everyone,

    I have a question with my application.
    I've created a query form (continuos form) with a click button to open an specific report. I used the next code:

    Code:
    Private Sub OpenPcmd_Click()
    On Error GoTo Err_cmdReport_Click
    
    Dim stDocName As String
    Dim stLinkCriteria As String
    Dim NC_Record_ID As String
    
    stDocName = "Sys_NCTotal_Rpt"
    stLinkCriteria = "[sCode]=" & "'" & Me.Code & "'" 
    NC_Record_ID = Me.Code
    
    DoCmd.OpenReport stDocName, acViewReport, , stLinkCriteria
    
    MsgBox "Report NC: " & NC_Record_ID, vbInformation, "Sys Management Tool"
    Exit_cmdReport_Click:
    Exit Sub
    
    Err_cmdReport_Click:
    MsgBox Err.Description
    Resume Exit_cmdReport_Click
    
    End Sub
    it works normal in general an open the report needed, but I have a second code to hidde all the access screens and when I use this the report is not shown



    Code:
    Option Compare DatabaseOption Explicit
    
    Global Const SW_HIDE = 0
    Global Const SW_SHOWMINIMIZED = 2
    Global Const SW_SHOWMAXIMIZED = 3
    
    Private Declare PtrSafe Function apiShowWindow Lib "user32" _
    Alias "ShowWindow" (ByVal hwnd As Long, _
    ByVal nCmdShow As Long) As Long
    
    Function fSetAccessWindow(nCmdShow As Long)
    
    Dim loX As Long
    Dim loForm As Form
    loX = apiShowWindow(hWndAccessApp, nCmdShow)
    
    End Function
    Note: My report setting has the Property Modal: Yes and Emerge: Yes
    I don't know why when the function fsetaccesswindows is call this report is not shown, it looks like it would be opened but I don't see it, in fact any report is not shown and I don't know why

    Please your help will be highly appreciated

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    You appear to have amended that code as it does not look completely 64bit to me.
    Perhaps that is why?

    How is that code meant to know which screen is the report screen?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    charly.csh is offline Competent Performer
    Windows 11 Office 365
    Join Date
    Nov 2014
    Posts
    186
    Hi Welshgasman enclosed I prepared the example and it would be easy to see
    One example is without hidding any element and other example it hiddes all the access screens but it does not pop out the report despite it has the property modal and emerge as Yes
    I hope it could help or you have a better code what would be help will be greatAccess two examples hidding and no hidding elements.zip

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    I do not have 64 bit Access.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    charly.csh is offline Competent Performer
    Windows 11 Office 365
    Join Date
    Nov 2014
    Posts
    186
    Any idea how to solve this or other code to hidde the Access Screens?
    The help will be highly appreciated this is the last part I need to solve to finish my application

  6. #6
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    Have a look at Colin's site here:
    https://www.isladogs.co.uk/control-a...ace/index.html

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  7. #7
    charly.csh is offline Competent Performer
    Windows 11 Office 365
    Join Date
    Nov 2014
    Posts
    186
    Thank you very much for the post shared Vlad, it was very useful, I loaded the example fixed and maybe can be useful for somebody else! =)
    Attached Files Attached Files

  8. #8
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    I responded to your other thread earlier today but it would appear you already have a solution
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

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

Similar Threads

  1. Report Does not shown while sending by Email!
    By cap.zadi in forum Reports
    Replies: 1
    Last Post: 11-26-2018, 05:30 AM
  2. Replies: 10
    Last Post: 08-03-2017, 01:00 PM
  3. Maximum number of records shown in a report
    By gaker10 in forum Reports
    Replies: 3
    Last Post: 10-23-2015, 01:12 PM
  4. modal property not working
    By rivereridanus in forum Forms
    Replies: 3
    Last Post: 07-06-2011, 02:54 PM
  5. Replies: 0
    Last Post: 03-01-2010, 02:53 AM

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