473,396 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Can a MsgBox-like popup be built using an Access form?

I’ve been told that it is easy to make a popup dialog using Access an form, but I have found it impossible. I want my popups to accept passed parameters (not globals), halt all execution until finished, and then return a value (again not via a global). Also they have to work more than once, for example a pick list that may need to pop up many times.

The VBA MsgBox is a perfect example of the popup behavior I desire. It accepts parameters and halts all program operations until the user clicks on a button. Is there anyone here who can point me to an example of how to do that simple thing? Thank you in advance.
Oct 2 '07 #1
4 3356
BradHodge
166 Expert 100+
I’ve been told that it is easy to make a popup dialog using Access an form, but I have found it impossible. I want my popups to accept passed parameters (not globals), halt all execution until finished, and then return a value (again not via a global). Also they have to work more than once, for example a pick list that may need to pop up many times.

The VBA MsgBox is a perfect example of the popup behavior I desire. It accepts parameters and halts all program operations until the user clicks on a button. Is there anyone here who can point me to an example of how to do that simple thing? Thank you in advance.
Change the PopUp property on the form to Yes. This will give you the required aspect you are looking for. Then you can add combo boxes or whatever you wish to to collect the data.

Hope that helps.
Brad.
Oct 2 '07 #2
FishVal
2,653 Expert 2GB
I’ve been told that it is easy to make a popup dialog using Access an form, but I have found it impossible. I want my popups to accept passed parameters (not globals), halt all execution until finished, and then return a value (again not via a global). Also they have to work more than once, for example a pick list that may need to pop up many times.

The VBA MsgBox is a perfect example of the popup behavior I desire. It accepts parameters and halts all program operations until the user clicks on a button. Is there anyone here who can point me to an example of how to do that simple thing? Thank you in advance.
Actually this may be done more or less easily and in a pretty elegant manner via OOP.
For example you design a form which represents dialog interface - controls, themes etc. When you write a class which instantiate this form inside itself and make all black job of tuning the form and retrieving the form output. Outside the class everything looks pretty nice and clean - your code instantiates the class object and works with it through properties/methods/events like with some built-in dialog, e.g. Office.FileDialog.
This provides even better functionality than simple getting/returning MsgBox.
Hope this makes a sense.
Oct 2 '07 #3
Actually this may be done more or less easily and in a pretty elegant manner via OOP.
For example you design a form which represents dialog interface - controls, themes etc. When you write a class which instantiate this form inside itself and make all black job of tuning the form and retrieving the form output. Outside the class everything looks pretty nice and clean - your code instantiates the class object and works with it through properties/methods/events like with some built-in dialog, e.g. Office.FileDialog.
This provides even better functionality than simple getting/returning MsgBox.
Hope this makes a sense.
Yes that's what I want to do, but I haven't found a parameter-passing mechanism that works. Can you please post a tiny example, perhaps emulating the MsgBox popup? I'm looking for how to pass parameters to the form before it becomes visible, halt the calling code's execution path until the user dismisses the form, and then retrieve the form's values.

I've tried using

DoCmd.OpenForm MyForm.Name,,,,,acDialog,OpenArgs:=MyArgs

without real success.

If there is a way to pass in the address of the calling object through OpenArgs then I could have the form read and set the calling object's members, but that doesn't seem possible.
Oct 2 '07 #4
FishVal
2,653 Expert 2GB
Ok.
I will post a relevant example.
You may also take a look at this thread.
Calling Subroutines across Forms (non-module)
This is actually not the same what I mention but a half way there.
Oct 2 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Raymond H. | last post by:
Bonjour, Est-il possible d'exécuter seulement un msgbox dans l'événement clik d'une ToolBar mais sans que le bouton en question (de la ToolBar) ne s'enfonce mais reste normal sans enfoncement ?...
3
by: JT | last post by:
im trying to use the MsgBox function in the following to display an ASP MsgBox containing text retrieved from the db into a recordset <% set rsMessages= myRecordset msg_text =...
2
by: benLeighton | last post by:
I suspect that my 2 yr old has been messing around again... simple say I call the msgbox function from a button click event thus # msgbox ("hi")
4
by: Lakrom | last post by:
Hi to all, how to put msgbox in this asp page, this send me a message Denied permission: 'MsgBox' <% Set Conn=server.createobject("ADODB.connection") Conn.open application("StrConRuta") set rs =...
1
by: Andrew | last post by:
Here's all of my code... Private Sub Submitted_Click() On Error GoTo Err_Submitted_Click DoCmd.SetWarnings False MsgBox("Have you ensured that no errors are present in the data?", 4, "Are...
7
by: Anne Richmond | last post by:
I have just returned to my first vb.net project after a few weeks and find I have a problem with Msgbox. The commands I added earlier work OK but any new ones fail to show the prompt value...
10
by: z | last post by:
I just installed Visual Studio .Net with Framework 1.1. I already had VB6 SP6 installed. I wanted to do a quick "hello world" example in VB.Net. The code is here: Private Sub...
4
by: Prabhudhas Peter | last post by:
Can Any one explain me what is the Difference between MsgBox and MessageBox.Show... In VB6 i used MsgBox, So Can I Say "MessageBox.Show" is the new version of MsgBoz which belongs to C# or VB --...
9
by: Ivan Jericevich | last post by:
In my code below at the line 'response' a blip sound is heard and the program exits the sub -- No MsgBox is displayed. What am I doing wrong? If nonNumberEntered = True Then msg = "Enter...
2
lee123
by: lee123 | last post by:
hi there it's been awhile since i have been to this site. but was wondering if you can call on a msgbox from a different object not to show until you have completed other textboxes. for example in...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.