tanzania
03-29-2007, 06:24 AM
Hi,
Is it possible to set a reference to an inactive object in VBA code? At the moment I have some code that will do what I need (sets page orientation and dimesions) but assumes the report is already opened and they code may be executed in a command click (which is not what I want). ie
Set objRpt = Screen.ActiveReport
DoCmd.SelectObject acReport, objRpt.Name
but i need the code to execute on an open event.
Cheers
Tania
Is it possible to set a reference to an inactive object in VBA code? At the moment I have some code that will do what I need (sets page orientation and dimesions) but assumes the report is already opened and they code may be executed in a command click (which is not what I want). ie
Set objRpt = Screen.ActiveReport
DoCmd.SelectObject acReport, objRpt.Name
but i need the code to execute on an open event.
Cheers
Tania