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: 223
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: 73,549
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...
Go to the top of the page
 
startingover0001
post Dec 4 2017, 01:05 PM
Post#3



Posts: 223
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: 73,549
Joined: 19-June 07
From: SunnySandyEggo


Hi,

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

Cheers!
Go to the top of the page
 
DanielPineault
post Dec 4 2017, 01:49 PM
Post#5


UtterAccess VIP
Posts: 6,135
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!).
Go to the top of the page
 
theDBguy
post Dec 4 2017, 01:56 PM
Post#6


Access Wiki and Forums Moderator
Posts: 73,549
Joined: 19-June 07
From: SunnySandyEggo


Hi Daniel,

Thanks. I hear you! smile.gif
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    23rd October 2018 - 07:39 PM