UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Custom Message Box, Access 2010    
 
   
startingover0001
post Dec 4 2017, 12:47 PM
Post#1



Posts: 182
Joined: 13-November 10
From: 37745


The beauty of the built-in message box is that when it pops up, the data on the form that called it does not save...yet. This is good as if it's a warning you most likely want to verify that you actually want to save it the way it is. Unfortunately, the standard message box is very limited. I want to use a custom message box. The problem comes in when the custom message box pops up. Because a custom message box is really just another created form, when the form that called the message box loses focus to focus on the message box...it saves the calling form data. BAD!!! Is there any way to make the custom msg box pop up withOUT saving the calling form data? I thought about using the before update of the save button but can't seem to make it work. I use these considerably when hitting save buttons whether making sure fields have been completed or comparing data from one form to another.
This post has been edited by startingover0001: Dec 4 2017, 12:48 PM
Go to the top of the page
 
theDBguy
post Dec 4 2017, 01:01 PM
Post#2


Access Wiki and Forums Moderator
Posts: 71,239
Joined: 19-June 07
From: SunnySandyEggo


Hi,

Are you opening the custom message box/form in Dialog mode? If not, try opening it in Dialog mode by using WindowMode:=acDialog in your OpenForm method.

Hope it helps...

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 
startingover0001
post Dec 4 2017, 01:05 PM
Post#3



Posts: 182
Joined: 13-November 10
From: 37745


I wondered about that as well but was unsure if that actually made a difference. Wondered also if setting the custom box as modal would make a diff.
Go to the top of the page
 
theDBguy
post Dec 4 2017, 01:11 PM
Post#4


Access Wiki and Forums Moderator
Posts: 71,239
Joined: 19-June 07
From: SunnySandyEggo


Hi,

Modal, Popup, and Dialog are different things. See if this article helps explain the differences.

Cheers!

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 
DanielPineault
post Dec 4 2017, 01:49 PM
Post#5


UtterAccess VIP
Posts: 5,456
Joined: 30-June 11



@theDBguy

Nice simple and clear article. hat_tip.gif I wish I had access to such an article when I first started out doing Access development it would have saved me some of my hair loss (If you knew me, you'd know that's a big deal!).

--------------------
Daniel Pineault (2010-2017 Microsoft MVP)
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...
Go to the top of the page
 
theDBguy
post Dec 4 2017, 01:56 PM
Post#6


Access Wiki and Forums Moderator
Posts: 71,239
Joined: 19-June 07
From: SunnySandyEggo


Hi Daniel,

Thanks. I hear you! smile.gif

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    18th December 2017 - 05:00 PM