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!

Button for drop down menus? Possible??? 2

Status
Not open for further replies.

maca9

Technical User
Apr 3, 2003
34
NZ
Hi

What I want to do is have a button in form mode which will syncronize the database with its master.

Basically just a button which does the same as the drop down menu command for syncronize. Surely it is possible to create a button to do anything that is an access command already?

I's also like to add a compress and repair button too, no doubt these are done in the exact same way so once I know how to link a button on a form to a menu command it will be easy.

Any assistance would be helpful.

Cheers

 
DoCmd.RunCommand acCmdSynchronizeNow
DoCmd.RunCommand acCmdRepairDatabase
docmd.RunCommand acCmdCompactDatabase

you're right as far as i know about doing anything that is a command already. there's a ton of commands like the above. go into a module and start typing the DoCmd.RunCommand and when you hit the space bar the entire list will appear.

Oh yeah, there's also an option you can set to automatically compact the database when its closed. Set it by going into Tools / Options / General, and look at the lower left hand corner for "Compact on Close".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top