Results 1 to 5 of 5
  1. #1
    Mehvan's Avatar
    Mehvan is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2016
    Posts
    133

    Post Change right click in report


    Hello Everyone

    How can I change right click in report ?
    when I click in report by using right click give me a list such as : ( print , close , Export Excel , Export PDF ...) , but by using Visual basic in Ms Access 2010
    I mean using code , not by using Macro .

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    there's no need to alter this.

  3. #3
    Mehvan's Avatar
    Mehvan is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2016
    Posts
    133
    I changed it , but by using Macro
    I want to know How I will change it by using VBA

  4. #4
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    You could research http://www.iaccessworld.com/how-to-c...ro-to-vb-code/

    Is this just an academic exercise or is there an underlying need for this?

  5. #5
    Mehvan's Avatar
    Mehvan is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2016
    Posts
    133
    thanks Orange for your help
    I know to convert Macro to VBA , but How will I call those code in VBA , I mean when change Macro to VBA , because when change it to VBA , it will change to an independence Function code , Like this below code :

    Code:
    Option Compare DatabaseOption Explicit
    
    
    '------------------------------------------------------------
    ' PrintingCommands_Print
    '
    '------------------------------------------------------------
    Function PrintingCommands_Print()
    On Error GoTo PrintingCommands_Print_Err
    
    
        DoCmd.RunCommand acCmdPrint
    
    
    PrintingCommands_Print_Exit:
        Exit Function
    
    
    PrintingCommands_Print_Err:
        MsgBox Error$
        Resume PrintingCommands_Print_Exit
    
    
    End Function
    
    
    '------------------------------------------------------------
    ' PrintingCommands_Export_To_Excel
    '
    '------------------------------------------------------------
    Function PrintingCommands_Export_To_Excel()
    On Error GoTo PrintingCommands_Export_To_Excel_Err
    
    
        DoCmd.RunCommand acCmdExportExcel
    
    
    PrintingCommands_Export_To_Excel_Exit:
        Exit Function
    
    
    PrintingCommands_Export_To_Excel_Err:
        MsgBox Error$
        Resume PrintingCommands_Export_To_Excel_Exit
    End Function
    How I will call that code by using right click , when I click by right click in report it gives me both (Print and Export To Excel ....) ?
    Attached Thumbnails Attached Thumbnails Capture.PNG  

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

Similar Threads

  1. Search Form Results Change When I Click On Them
    By DaneTrain24 in forum Forms
    Replies: 5
    Last Post: 02-04-2016, 05:03 PM
  2. Replies: 4
    Last Post: 12-09-2015, 09:02 AM
  3. Replies: 3
    Last Post: 07-22-2014, 11:37 AM
  4. Replies: 6
    Last Post: 12-04-2013, 07:00 PM
  5. Change fields based on a combobox click
    By Richie27 in forum Programming
    Replies: 5
    Last Post: 05-31-2012, 08:01 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