Solved

vba  to call a macro in access 2003

Posted on 2013-11-22
6
555 Views
Last Modified: 2013-11-22
Hi expert's

I have a macro in ms access 2003 that works fine ...also have a second macro......what I want to do is call the second macro from the first macro..

Second macron is private sub cmdrunme ()
0
Comment
Question by:route217
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 27

Assisted Solution

by:☠MAS☠
☠MAS☠ earned 166 total points
ID: 39668709
Write the below command in your first macro
"Call cmdrunme"
0
 
LVL 52

Assisted Solution

by:Rgonzo1971
Rgonzo1971 earned 167 total points
ID: 39668717
Hi,

If not in  the same module it shouldn't be private

pls try

Sub YourMacro1
'Your code
Call cmdrunme()

'Your code
End Sub

Open in new window

Regards
0
 
LVL 14

Accepted Solution

by:
Bill Ross earned 167 total points
ID: 39668719
Hi,

In the macro use the RunCode option with cmdrunme ()

You will need to change the sub to a function and to public.

Private Sub cmdrunme()

s/b

Public Function cmdrunme()

Macros run functions not subs.

Private means they can't find them from a Macro which runs Public.

Regards,

Bill
0
 

Author Comment

by:route217
ID: 39669026
Apologies experts I meant to split the points can we open the question up
0
 

Author Closing Comment

by:route217
ID: 39669159
Thank you experts for re opening question and apologies on my part.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question