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
> One Way To Make A Dialog Box, Any Version    
 
   
mempie
post Nov 18 2019, 02:54 PM
Post#1



Posts: 262
Joined: 27-September 01



I'm interested in good ways to make a dialog box. Here, I'll describe a method that I don't use, but which I have seen described. I'm interested to know what people think of this method in general, and any refinements that make it work better. Shortly, I'll write another post that describes my own, more complicated way.

One can make a form, perhaps always-on-top but maybe not modal, with controls needed for selecting one or more values. If the user clicks an OK button, the form is hidden but not closed. The hidden form then holds the user-selected values for as long as they are needed. Another routine can use Forms!frmSomeDialogBox!txtUsersValue.Value when it needs the value.

Do the experts use this technique? If so, how does execution proceed? If the dialog box isn’t modal, the procedure that opened it will want to continue executing, unless there are no more lines. But if the dialog box is modal, execution of the calling sub wouldn’t proceed after the dialog box is hidden.

I never used this technique, because I don’t like the idea of a hidden form floating in the background of my database, even though I’m not sure what actual problem it would cause. Also, I like the idea of “loose coupling” of objects. If I’m testing a dialog box, I want it closed, not hidden, when I finish testing it, without having to close the database to get rid of it.
Go to the top of the page
 
theDBguy
post Nov 18 2019, 03:00 PM
Post#2


UA Moderator
Posts: 76,866
Joined: 19-June 07
From: SunnySandyEggo


Hi. To each his/her own, really. If you know what you did, you should know how to undo it. This technique works for many, but may not be for everyone. A new approach that recently became available is called TempVars.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
GroverParkGeorge
post Nov 18 2019, 04:42 PM
Post#3


UA Admin
Posts: 36,181
Joined: 20-June 02
From: Newcastle, WA


Many years ago I ran across an mdb that had a hidden form like that you describe.

While it worked, it was not always reliable, IMO.

Tempvars are a much more stable method to create and store stable values.
This post has been edited by GroverParkGeorge: Nov 18 2019, 04:44 PM

--------------------
My Real Name Is George. Grover Park Consulting is where I did business for 20 years.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    11th December 2019 - 03:45 AM