Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
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
  #1 (permalink)  
Old March 29th, 2004, 04:17 PM
Authorized User
 
Join Date: Sep 2003
Location: , , .
Posts: 83
Thanks: 0
Thanked 0 Times in 0 Posts
Default Create Access macro using C#

Hi everyone,

Does anyone know how to create a macro in an Access 2000 file using C#. I need to create a report programatically. However, I think I am better off writing a macro that will create the report and let the user run it. However, I could not find a way where I could create a macro from outside Access. If anyone knows of a way or can point me to a resource, I would be really greateful.

Thanks,

Sincerely,

Pankaj



  #2 (permalink)  
Old March 29th, 2004, 04:58 PM
Authorized User
 
Join Date: Mar 2004
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I very much doubt that you can do this. I know you can create a table within a Access db from C# but that is as far as you can go. I believe that creating reports/forms/macros is something that can only be done from within Access itself.
  #3 (permalink)  
Old March 30th, 2004, 07:42 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Melbourne, Vic, Australia.
Posts: 308
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Why is it that you want to do it in C#? and why do you want it done outside of Access?

I am a loud man with a very large hat. This means I am in charge
  #4 (permalink)  
Old March 31st, 2004, 04:31 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

I presume you would have to create a Comwrapper using tlbimp.exe and use the native Access methods. Do you mean an Access Macro that shows up in the Macros section or a block of VBA code?

--

Joe


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access 2002 Macro Security echovue Access 3 March 2nd, 2010 03:03 PM
Access Macro Q ventomarme Access VBA 0 August 10th, 2007 09:04 PM
Unable to create Macro valdetero Excel VBA 0 July 26th, 2007 02:58 PM
Creating Access macro using C# pankaj_daga ADO.NET 1 March 30th, 2004 01:05 AM
How do I execute / run an Access Macro Dean Hewitt Access ASP 0 February 11th, 2004 05:35 PM





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