Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Repainting a form opened in acDialog mode...

Status
Not open for further replies.

calihiker

Technical User
Joined
Jun 13, 2003
Messages
96
Location
US
I need to open the form in acDialog mode so that the user can enter in some values to be used by the report that is being run once they hit the ok button...

DoCmd.OpenForm "frmParameters", acNormal, , , acFormEdit, acDialog

The problem is that for some reason the acdialog mode prevents me from repainting the form and it's controls after assigned a new value to a label with these statements..

Forms!frmParameters!lblDirections.Caption = "Enter in the parameter values for the " & Me.Name & " report and press ok"
DoCmd.RepaintObject acForm, "frmParameters"

These statement are run when the report is opened.

Is there a way to get around this problem???
Thanks in Advance!! :-)
 
either open the form in Design mode (Hidden), change the caption, close and save it, then re-open it to capture the data....or. create a public variable ... store Me.Name to it prior to the code to open the Form in acDialog mode, and place the code to change the label caption in the Form's On Open event using the pubic variable.


Me.lblDirections.Caption = "Enter in the parameter values for the " & strVariable & " report and press ok"



PaulF

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top