Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Macros / December 2005

Tip: Looking for answers? Try searching our database.

macro and code in the same event

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
neeraj - 21 Dec 2005 15:40 GMT
I have a report for which I had a macro, say Macro1 written into its 'On
Open' property. Later I realized that I wanted to have the report opened
maximized. Not knowing how to do that in a macro, I added a code in the
Report Open event in the VBA window as docmd.maximize. But when the report
opens, it doesn't open maximized though Macro1 functions properly. Is there
an equivalent for this code command in a macro. Can a macro and code be
written in the same event. How can I achieve both these tasks?
Douglas J. Steele - 21 Dec 2005 16:00 GMT
You have to choose one or the other (although a macro can call a VBA
function, or VBA code can call a macro)

Actually, you're best off putting all of your tasks in the VBA code. Macros
may be quick to implement, but they have the downside of not allowing error
trapping, plus you can't document what you're doing as easily as you can by
having comments in VBA.

In any case, macros have a Maximize action available in them.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

>I have a report for which I had a macro, say Macro1 written into its 'On
> Open' property. Later I realized that I wanted to have the report opened
[quoted text clipped - 4 lines]
> an equivalent for this code command in a macro. Can a macro and code be
> written in the same event. How can I achieve both these tasks?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.