Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 7th, 2011, 04:09 PM
Authorized User
 
Join Date: Apr 2009
Posts: 15
Thanks: 3
Thanked 0 Times in 0 Posts
Default Running a sub from another sub

I have searched for this but maybe I am not asking in the proper way, but here is my problem;
I have an Access 2007 accdb that when it opens a form opens, when this form opens I have an event for the Form_Load.
In the Form_Load I want to run a sub routine from a module called transferToMalmoSoback2 the subroutine I want to run is cmdExportToExcel
I am pretty sure I am forgetting the command but everything I try is either just opening the code or giving me an error.
 
Old July 9th, 2011, 02:52 PM
Friend of Wrox
 
Join Date: Sep 2010
Posts: 245
Thanks: 5
Thanked 24 Times in 23 Posts
Default

Try:

Code:
call cmdExportToExcel
__________________
Boyd Trimmell aka HiTechCoach (.com)
Microsoft Access MVP Alumni 2010-2015
 
Old July 30th, 2011, 12:29 PM
Registered User
 
Join Date: Jul 2011
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is your function Public or Private in the Module? If it is Public you should be able to just call it: FunctionName(param1,param2)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Running J2EE bluecat2010 J2EE 1 January 2nd, 2007 01:35 AM
Running Modules Brendan Bartley Access 2 December 28th, 2006 11:05 AM
Code not running larryg BOOK: Beginning Access VBA 3 August 18th, 2006 08:36 AM
Running Sum semooth Access 2 July 21st, 2004 09:17 PM
Running ASP Valerie BOOK: Beginning ASP 3.0 2 April 7th, 2004 08:35 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.