Re: Command Button Wizard



Darn: I missed the version number! And it was right at the beginning of your post.

A2000 doesn't have the Macro Security issue, so something else is wrong.

Try this sequence (in order):

1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Compact the database:
Tools | Database Utilities | Compact/Repair

3. Close Access. Make a backup copy of the file. Decompile the database by entering something like this at the command prompt while Access is not running. It is all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

4. Open Access (holding down the Shift key if you have any startup code), and compact again.

5. Open a code window.
Choose References from the Tools menu.
Uncheck any references you do not need.
Compare the checked references with the ones checked in the databases that do work: any differences?
For a list of the ones you typically need in your version of Access, see:
http://allenbrowne.com/ser-38.html

6. Still in the code window, choose Compile from the Debug menu.
Fix any errors, and repeat until it compiles okay.

7. Still in the code window, choose Options on the Tools menu. On the General tab, make sure Error Trapping is set to:
Break on Unhandled Errors
and the Compile on Demand is unchecked.

At this point, you should have a database where the name-autocorrect errors are gone, the indexes are repaired, inconsistencies between the text- and compiled-versions of the code are fixed, reference ambiguities are resolved, the code syntax is compilable, and the VBA options are set to show errors and avoid this kind of corruption.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"majordud" <majordud@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:84A79365-D939-4587-ABBC-7ECF24F0B2E5@xxxxxxxxxxxxxxxx
Thanks for your reponse, but as stated, I am using Access 2000 - perhaps you
could tailor your comments more specifically for 2000?

"majordud" <majordud@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F201863B-3B8A-48EC-9692-CFF98B9940CE@xxxxxxxxxxxxxxxx
> Using Access 2000, I have built an extensive database, & the command
> buttons
> built with the Wizard all work. All simple commands, such as Print, > Find
> Record, etc. I build another database (ostensibly with all the same
> settings) and the command buttons built with the Wizard will not work -
> none
> of them - when clicking on such a button, it depresses, but nothing
> happens.
> I build another database, and the command buttons built with the Wizard
> all
> work. Why? What variable is available that apparently switches off > all
> the
> buttons? The macro code established by the Wizard in a db that works > is
> identical to the macro code in the db that doesn't work.
> Suggestions?
> -- > signed, me, myself and I.



.