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