Solved

No Error on Compile

Posted on 2006-11-27
3
401 Views
Last Modified: 2012-08-14
I am using the following code to compile my vba code by clicking on a button.

Private Sub cmdCompile_Click()

    DoCmd.RunCommand acCmdCompileAllModules
    DoCmd.RunCommand acCmdCompileAndSaveAllModules

End Sub

The code is running, but it is not throwing debug errors when I have problems with my code.  Is there an alternative way I should be writing this?  

I get an error with my code when I use the menu drop down - Debug/Compile, but not when I click the button I created.
0
Comment
Question by:jamesdean666
[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
3 Comments
 
LVL 34

Accepted Solution

by:
jefftwilley earned 500 total points
ID: 18022495
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 18022501
when u debug/compile manually, what line of code does it fail on?

0
 

Author Comment

by:jamesdean666
ID: 18023435
the code never failed.. it just never indicated there were errors which I purposely placed in the code to test.

0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
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…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

622 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