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 / Reports / Printing / September 2005

Tip: Looking for answers? Try searching our database.

Toolbar Command Report

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Debbie D. - 28 Sep 2005 00:25 GMT
Hi all,

First thanks for taking the time to read this.  I have a report based on a
query.  I know that I cannot add a active button as I can in form.  However,
it is possible that I can add a command button to a toolbar or similar to
perform the following procedure:

Dim strType As String
Dim strName As String
strType = acOutputQuery
strName = "BCSNewRegistrations"
DoCmd.OutputTo strType, strName, acSpreadsheetTypeExcel9
MsgBox "British Computer Society Excel Registrations Data Created"

When I add a new button it mentions something about a new function I can
create.  Any and all ideas welcome.  Thanks again.

Debbie D.
'69 Camaro - 28 Sep 2005 01:02 GMT
Hi, Debbie.

> When I add a new button it mentions something about a new function I can
> create.

Place your code below in a public function in a standard module.  It
_cannot_ be a sub.  As soon as you've created your new button and placed it
on the toolbar, right-click the button and select Properties from the pop-up
menu.  Add a caption and a helpful screen tip so anyone hovering the mouse
over the button can read what the button is.  Next, select the On Action
combo box and type an equals sign, then the name of your function, then
opening and closing parentheses, without any spaces.  For example:

=openNewQry()

Select the "Close" button to save your changes.  Select the "Close" button
to close the Customize dialog window.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers.  Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.

> Hi all,
>
[quoted text clipped - 14 lines]
>
> Debbie D.
Debbie D. - 28 Sep 2005 09:27 GMT
69 Camaro

Thanks for such a sweet and quick reply.  Worked little a treat!  

Debbie D.

> Hi, Debbie.
>
[quoted text clipped - 48 lines]
> >
> > Debbie D.
'69 Camaro - 28 Sep 2005 10:23 GMT
You're very welcome.  Glad you like this handy little trick.  :-)

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

> 69 Camaro
>
[quoted text clipped - 67 lines]
>> >
>> > Debbie D.
 
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.