Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compile single module

Status
Not open for further replies.

grnzbra

Programmer
Mar 12, 2002
1,273
US
When I compile an Access 2002 database, the only option available is to compile all the code in the database. Is there any way to compile only one module or procedure?
 
As fas as I know, NO. But what's matter ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I have a database that have some old code that won't compile. I have a new module that I am trying to run. Every time I try to compile it, it fails because of the old module. I can't get rid of the old module and I haven't got time to fix it. I would like to compile the new module before I run it and have it blow up halfway through modifying the data.
 
some old code that won't compile
???
Did you convert the database to newer version of access or ?
It's highly unsafe to keep code that won't compile ...
First thing to do: menu Tools -> References ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
grnzbra,
If I were you I'd just cut that code out and paste it to notepad until you have time to fix it.

Access used to be unpredictable about what it would compile--I'm not sure if this has changed. I've gotten sudden compile errors in some old, abandoned function that I hadn't touched in years. And I'm not talking about references to controls or objects that had been removed--I'm talking about spelling errors or syntax errors that had always been there, and for some reason never, ever, caused a compile error until months or even years later.
--Jim
 
grnzbra,

If I were you I'd just Ctr+A and comment that block, since you don't have time to fix it!
 
In one db that was not compiling i have done a little trick until i get time to clear it.
While I was in the VBA window
TOOLS > {DB NAME}PROPERTIES > PROTECTION TAB
checked lock project for viewing, with a password.My users can't go into the module unless they know the password.

________________________________________________________________________
Zameer Abdulla
Visit Me
No two children are alike - particularly if one is yours and the other isn't.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top