473,486 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Address a Control on a PopUp Dialog Form.

I have a Dialog PopUp Form that is called by the following code:

DoCmd.OpenForm stDocName, , , stLinkCriteria, cFormReadOnly, acDialog

I would like to set the Visible propery of a Label in this form after
the call is made. How can I do this ???

I tried the following code, but I get "Cant Find Field" Error. I also
noticed that error occurs after the PopUp Form is released, suggesting
that my second line of code is not running until the Dialog form is
gone.

Me.[F-BUSPOPUP].Form.lblMyLabel.Visible = True

Thanks

Mar 8 '07 #1
3 2223
On 8 Mar 2007 08:25:48 -0800, Ap******@gmail.com wrote:
I have a Dialog PopUp Form that is called by the following code:

DoCmd.OpenForm stDocName, , , stLinkCriteria, cFormReadOnly, acDialog

I would like to set the Visible propery of a Label in this form after
the call is made. How can I do this ???

I tried the following code, but I get "Cant Find Field" Error. I also
noticed that error occurs after the PopUp Form is released, suggesting
that my second line of code is not running until the Dialog form is
gone.

Me.[F-BUSPOPUP].Form.lblMyLabel.Visible = True

Thanks
When you open a form in dialog, processing stops until the dialog form
is hidden or closed.

First, set the label's Visible property to No.
Then open the form using the OpenForm's OpenArgs argument.

DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormReadOnly,
acDialog,"X"

Then code the dialog form's Load event:

If Not IsNull(Me.OpenArgs) then
MyLabel.Visible = Me.OpenArgs = "X"
End If

The label will be not visible except when the "X" has been passed in
the OpenForm OpenArgs argument.

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Mar 8 '07 #2

When a form is opened using the acDialog setting, your code branches
out to the form as though you called another function. The calling
code does not resume until the form is closed or hidden. You can pass
other information to the form using the OpenArgs argument. When the
form is opened, code in that form would read the OpenArgs property and
act on it accordingly. Alternatively, a public variable could be
declared and set before opening for the popup to use.

Mar 8 '07 #3
Thanks guys.

I used a Public Variable and it worked for me.
OpenArgs property is a new animal I will set aside for taming

Greg
Mar 8 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
9543
by: Steve | last post by:
Does anyone know of a way to open a messagebox over a popup form opened in acDialog mode? Thanks for any ideas! Steve
7
2090
by: bu | last post by:
I have a form with a handful of comments fields. I am trying to code the form in such a way that when the user clicks on the field, a dialog box will open up displaying the full contents of the...
4
2987
by: SteveS | last post by:
Hello. This is a strange problem which does not make sense to me. I open a popup page with the following javascript code: function OpenDenyWindow(changeId) {...
4
1392
by: yxq | last post by:
Hello, I want to popup a form to indicate doing a long time work, when this form shown, anyting on main form are disabled until the popup form closed. ************************** Dim a as new...
3
3557
by: Opa | last post by:
Hi , I have a form with javasript which launches a popup via the showModalDialog() method. I get the dialog to open, now I am trying to first get a reference to the calling form from the popup...
0
1754
by: jphelan | last post by:
After opening and clicking on the popup calendar command control button, "fdlgCal"; I click on a given date. The date is suppose to then appear in a date field next to the control. Instead, I get...
10
4791
by: ApexData | last post by:
I can't seem to make a PopUp Dialog form Invisible! 'My main form calls the PopUp DoCmd.OpenForm "F-PAUSE", WindowMode:=acDialog 'My PopUp form "F-PAUSE" contains this code Private Sub...
3
5193
by: ApexData | last post by:
I am using code from the following links to establish a Browse File and Browse Folder dialog. http://www.mvps.org/access/api/api0001.htm http://www.mvps.org/access/api/api0002.htm This code...
4
1880
by: questionit | last post by:
Hi everyone I want to open a form as a Dialog and then i want to change the form controls' property e.g make a textbox disabled etc. I've tried various ways but dont seems to work. I was...
0
7100
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6964
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
7126
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7175
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
7330
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5434
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,...
1
4865
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
262
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.