My ACC2000 form has some controls that on the OnCurrent event are conditionally made invisible. I also need to adjust the page margins programmatically. In ACC2000 this must be done using PRTMIP which necessitates loading the form in design view (DoCmd.OpenForm frmMyForm, acDesign) setting the margins, then returning to normal View (DoCmd.OpenForm frmMyForm, acNormal) to print it. When the form returns to normal view (1) the controls that had been made invisible reappear (ok, not a problem) and (2) further code to make them invisible returns 'the expression you entered refers to an object that is closed or doesnt exist'. What the blooming heck is going on?
(Notes: This happens whether the controls are referred to in (2) in the Me.Control syntax or Forms("MyForm").Controls("MyControl") syntax. The code for adjusting the margins I have adapted from http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_20831908.html )
I really would appreciate some help with this!
(Notes: This happens whether the controls are referred to in (2) in the Me.Control syntax or Forms("MyForm").Controls("MyControl") syntax. The code for adjusting the margins I have adapted from http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_20831908.html )
I really would appreciate some help with this!
Last edited: