473,322 Members | 1,510 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Modules Access 2003

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
3 1907
"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


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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Fuming Wang | last post by:
Hi, I have several modules that need to access global variables among them. I can do that by import modules: module A: gA = 'old' module B: import A
36
by: Tim Churches | last post by:
If a compiled Python extension module B includes code from some other software A which is licensed only under the GPL, do other Python programmes, C, which import module B also need to be licensed...
5
by: Ross A. Finlayson | last post by:
Hi, I'm scratching together an Access database. The development box is Office 95, the deployment box Office 2003. So anyways I am griping about forms and global variables. Say for example...
7
by: Lauren Quantrell | last post by:
At running the risk of asking how big is too big... Is there a rule of thumb or a best practice that says I may have too many modules? I currently have a Access2K app with about 30 code modules,...
1
by: binodland | last post by:
Hi I have an application using MS Access as GUI and, SQL server to store the data. I need to implement some sort of change management / source control for the application. It is a problem to...
13
by: Robin Haswell | last post by:
Hey people I'm an experience PHP programmer who's been writing python for a couple of weeks now. I'm writing quite a large application which I've decided to break down in to lots of modules...
8
by: Joshua J. Kugler | last post by:
So, I have: ModTest __init__.py AModule.py BModule.py CModule.py All works fine. However, when I import ModTest, I would like it to discover and store the names of the modules beneath it,...
4
by: Tom Jones | last post by:
I have an application that was originally built using Visual Studio 2003 that I upgraded to Visual Studio 2005. When I attempt to build the *.msi file in the deployment project, I am getting a...
0
by: peridian | last post by:
Hi, I have the below code to transfer code modules between Access database files. I have three problems, only one of which is annoying. a) How do you prevent the Save As box from appearing...
3
by: Roy Tong | last post by:
I maintain a shared database on Access 97. I've just tried converting a test copy of the database to 2003 and it appeared to work OK. That is I got no error messages. However then I look at my...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.