Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 4th, 2005, 09:51 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 159
Thanks: 0
Thanked 0 Times in 0 Posts
Default Trying again !

Hi experts !
I've worked on a MS function so it does a task i'm working on.
The function is called TransposerNew and it modifies a Table1 which
has the data to a second Table2. Table2 has a lay-out fitted to
a Report. The function has two arguments: Table1 and Table2. It
runs when i call it from the imediate window. I would like to call
TransposerNew from a button. Dont know the code for the task.
Any help will be welcome.
Regards Penta.

 
Old March 4th, 2005, 09:57 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

If you are typing

TransposerNew Table1, Table2

in the immediate windows, what you would do to run it from a button, if create the button, goto properties and select the OnClick event. Goto your VBA window, and type

TransposerNew Table1, Table2

inside the event. And that should work for you.

Mike

Mike
EchoVue.com
 
Old March 4th, 2005, 10:08 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 159
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Mike !
I've tried that and it dont work. By the way when i run it from the IW i call
it from a sub procedure where the arguments are specified.
R.P.

 
Old March 4th, 2005, 10:12 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Well, in that case, you would want to call the sub-procedure from the OnClick event, or you could copy the code from the SubProcedure into the Event and then manipulate it, if you need to make changes to which tables the function is referencing.

Mike

Mike
EchoVue.com
 
Old March 4th, 2005, 10:21 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 159
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks again Mike !
I went again to the property window of the button OnClick_Event and used
= TransposerNew("Table1";"Table2") and now it's working.
Have a good day!
R.P.

 
Old March 4th, 2005, 10:29 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Good to hear, trying to get the right syntax in place has got to be one of the toughest parts of getting all these things to work together!

Later

Mike

Mike
EchoVue.com









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.