S
Sprinks
In one use of a multi-purpose form, I make several controls invisible. I
want to do this "behind the scenes" and present the form to the screen when
complete. The following code, however, displays the form in its virgin
state, and then changes when the code is complete. Can anyone tell me how to
achieve the desired behavior?
Thank you.
Dim stDocName As String
Application.Echo False
stDocName = "Timesheet"
DoCmd.OpenForm stDocName, acNormal, , , , , "TSQueryAll"
Forms(stDocName).AllowAdditions = True
Forms(stDocName).AllowDeletions = True
Forms(stDocName).Controls("cboStaffName").Visible = True
Forms(stDocName).Controls("cboStaffName").SetFocus
Forms(stDocName).Controls("txtStaffName").Visible = False
Forms(stDocName).Controls("cmdPost").Visible = False
Application.Echo True
want to do this "behind the scenes" and present the form to the screen when
complete. The following code, however, displays the form in its virgin
state, and then changes when the code is complete. Can anyone tell me how to
achieve the desired behavior?
Thank you.
Dim stDocName As String
Application.Echo False
stDocName = "Timesheet"
DoCmd.OpenForm stDocName, acNormal, , , , , "TSQueryAll"
Forms(stDocName).AllowAdditions = True
Forms(stDocName).AllowDeletions = True
Forms(stDocName).Controls("cboStaffName").Visible = True
Forms(stDocName).Controls("cboStaffName").SetFocus
Forms(stDocName).Controls("txtStaffName").Visible = False
Forms(stDocName).Controls("cmdPost").Visible = False
Application.Echo True