Results 1 to 8 of 8
  1. #1
    Perfac's Avatar
    Perfac is offline Expert
    Windows 10 Access 2016
    Join Date
    May 2016
    Location
    Centurion Pretoria
    Posts
    618

    Customized buttons in Message Box

    I found complicated tutorials on how to create customized buttons in a message box, but don't have success yet. Instead of vbYesNo I want to have my own words in the buttons. I will appreciate if there is a referral to a tutorial or advice. Thank you.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Then 'roll your own' which is just a form with a lot of code to function like a message box. Fairly common topic. Here is one discussion https://www.accessforums.net/showthread.php?t=86880
    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
    Perfac's Avatar
    Perfac is offline Expert
    Windows 10 Access 2016
    Join Date
    May 2016
    Location
    Centurion Pretoria
    Posts
    618
    Sorry if I am short of understanding, after reading and opening the attachment. I just want the buttons in the Message box to display something else than "Yes" and "No". The rest I will manage. I don't understand exactly what to do here.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    There is no intrinsic method to accomplish that - no property settings. Requires either some complex Windows API code to modify MsgBox (assuming that is possible) or build your own form that acts like a message box.

    What you can do is adapt the form and code from the sample db to yours.
    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.

  5. #5
    Perfac's Avatar
    Perfac is offline Expert
    Windows 10 Access 2016
    Join Date
    May 2016
    Location
    Centurion Pretoria
    Posts
    618
    Thank you. My time will allow me to look deeper in this tomorrow.
    a. Every form of my 150 forms returns at least one report.
    b. My aim is to have the easiest way with the least number of clicks to select reports, selecting mostly between Alphabetical and Numerical order.
    c. There may be reports needed to be printed in more orders than 2 as well.
    d. It will be nice to click once on a print button, which then displays multiple options of order the same report can be printed in.
    d. I am capable of the very "Long way", setting up a query and report for every order. Many more than 300 extra objects in my app!
    e. A genius like you knows how to accomplish what I want in a different way, I do not right now. But I will box on.
    f. I can actually do it with Yes and No on the buttons. But it is just not right. The buttons should display "Alphabetical","Numerical" etc if more.
    g. I have examples of forms that acts like a message box, but tomorrow I will look into that.

  6. #6
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    I gave my users a list on available reports in a combo box.
    In the table I associated a form if any values needed to filter the report, the sql for the source etc.
    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

  7. #7
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Agee with @Welshgasnan. Provide a list of reports (in whatever order works for you) in a combo or listbox.

    However, if you really want to create customised message forms, have a look at the examples in my Attention Seeking Database (isladogs.co.uk)
    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

  8. #8
    davegri's Avatar
    davegri is online now Excess Access
    Windows 11 Access 2019
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    This is a basically a UI (user interface) problem. With the information provided, I can't visualize what the current UI is. What would be the method to match the 300 reports with the appropriate options if all report options are not the same?
    Once that's resolved, custom right-click menus might address the Message Box problem nicely. The right click would present options (bypassing a Message Box entirely). Depending on the user's choice from the right-click menu, appropriate functions would run to accomplish the desired end.

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

Similar Threads

  1. Customized Ribbon
    By swenger in forum Access
    Replies: 7
    Last Post: 06-21-2016, 04:03 PM
  2. Replies: 6
    Last Post: 01-10-2015, 01:58 AM
  3. Replies: 4
    Last Post: 10-02-2014, 11:01 AM
  4. Customized Scroll Bar
    By pkstormy in forum Code Repository
    Replies: 0
    Last Post: 09-05-2010, 04:26 PM
  5. customized menu bar
    By marianne in forum Access
    Replies: 13
    Last Post: 04-12-2009, 09:47 PM

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