By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,480 Members | 2,953 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,480 IT Pros & Developers. It's quick & easy.

Modules Access 2003

P: n/a
Deb
I am doing something wrong, but I don't know what!

I converted some of my macros to modules -- but they won't run. I
debugged/compiled but the run command still is greyed out. What do I
need to change.

I know that this is a basic question, but I am very new to code and
need all the help I can get.

Jan 5 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Deb" <ko*****@swbell.net> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I am doing something wrong, but I don't know what!

I converted some of my macros to modules -- but they won't run. I
debugged/compiled but the run command still is greyed out. What do I
need to change.

I know that this is a basic question, but I am very new to code and
need all the help I can get.

You need to call the function or sub name from the same place that you
called your corresponding macro from.

HTH - Keith.
www.keithwilby.com
Jan 5 '06 #2

P: n/a


Little bit of a problem. This is a macro that is a "stand alone" macro
and is not called from any form, report, etc. I use it to run queries,
print reports, and export queries to Excel. So there is no place to
call it from. Now what?

*** Sent via Developersdex http://www.developersdex.com ***
Jan 5 '06 #3

P: n/a
Create yourself a form with buttons on it that will call each of the new
procedures in their Click event. You can run them from the code editor, but
you shouldn't need to get into that on a regular basis when using the
database, just when making design changes. The action should come from forms
you've created. You can also create a custom toolbar and place buttons on it
that will call the new procedures.

One advantage of the form with buttons is that if there were some procedures
you called in succession, you could have the Click event of the button call
each in succession instead of one button for each of those successive
routines.

When I mention calling them from the Click event, I don't mean placing the
name of the procedure in the On Click box under the button's Events tab.
Instead, set the box to [Event Procedure] and call the routine from the code
in the event procedure. If the routine is a function (as opposed to a sub)
you can call it directly from the box, but it is a good idea to get used to
using the event procedure.

--
Wayne Morgan
MS Access MVP
"Deb Koplen" <de********@verizon.com> wrote in message
news:9r***************@news.uswest.net...


Little bit of a problem. This is a macro that is a "stand alone" macro
and is not called from any form, report, etc. I use it to run queries,
print reports, and export queries to Excel. So there is no place to
call it from. Now what?

*** Sent via Developersdex http://www.developersdex.com ***

Jan 5 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.