Heenan, Lambert
Lambert.Heenan at chartisinsurance.com
Wed Sep 9 09:56:39 CDT 2009
Because the code module of a form is a class module you need to make that procedure (which is really a class method) public with... Public Sub GetResults_LC1_Check <code> End Sub You will then be able to call the routine from anywhere with... Forms!YourForm.GetResults_LC1_Check And you *might* be able to call it with Parent.GetResults_LC1_Check from within the sub form. HTH Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Wednesday, September 09, 2009 10:31 AM To: Access Developers discussion and problem solving Subject: [AccessD] Forgotten syntax I have a form containing a subform, from which I want to call a procedure that lives in the parent form. The syntax I am using is: <vba> Call Me.Parent.Form.GetResults_LC1_Check </vba> The procedure is also called directly on the parent form, where it works fine, but when called from the subform it errors out (Application-defined or object-defined error in procedure ...) I recall once seeing a document describing all the various syntax references to Access objects. Anyone know where that lives? TIA, Arthur -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com