Stuart McLachlan
stuart at lexacorp.com.pg
Fri Mar 15 06:18:25 CDT 2013
It looks as though the problem is trying to do too many things in the On_Open or On_Load and a wm_paint is being generated too soon. Instead of doing it this way, how about calling a Sub which does the calculations, opens the form hidden, populates it's controls and then shows it. i.e. do nothing in the the on_open/on_load. -- Stuart > >>Hi all > >> > >>From a form I try to open another form hidden by clicking a button: > >> > >> DoCmd.OpenForm "frmSomeForm", acNormal , , , , acHidden > >> > >>Then the hidden form is supposed to do some calculations and, when > >>finished, unhide itself by means of a not visible textbox bound to a function: > >> > >> =SetVisible() > >> > >>which contains: > >> > >>Private Function SetVisible() As Boolean > >> Me.Visible = True > >> SetVisible = True > >>End Function > >> > >>The sequence works except for one thing - the form isn't opened hidden > >>because its frame is shown at once. > >>Thus, the sequence is: > >> > >>1. Frame of hidden form is shown on top of the calling form. The form > >>itself is transparent so the calling form is still visible inside the frame. > >>2. The "hidden" form performs the calculations. > >>3. The "hidden" form paints its inside invisibly. > >>4. SetVisible is called. > >>5. The completed form is visible. > >> > >>I've also tried opening the hidden form with: > >> > >> Set frm = New Form_frmSomeForm > >> frm. Visible = False > >> > >>No difference. Also having this in the OnOpen event of the form: > >> > >> Me.Visible = False > >> > >>All to no avail. > >> > >>Any ideas for opening a form completely hidden? > >> > >>/gustav >