Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
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 April 27th, 2006, 04:14 AM
Registered User
 
Join Date: Apr 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Running VBA Code from a DataAccessPage

Hello,

i want to run VBA-Code from a DataAccessPage. I placed a Button on the Page and try to run VBA-Code using VBScript. But it doesn't work. Here is the Code:
Code:
  Dim oAccess
  Set oAccess = CreateObject("Access.Application")
  oAccess.Run "Befehl0_Click"
  Set oAccess = Nothing
Someone an idea whats wrong?

Thx

Basti

 
Old April 28th, 2006, 02:52 AM
Authorized User
 
Join Date: Mar 2006
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
the procedure, which you call, must be public, and must be located (stored, saved) in standard module (not in module of any class (form, report, you class)).
Peko

 
Old June 1st, 2006, 10:10 AM
Registered User
 
Join Date: Apr 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It is, but it still doesn't work.

Basti






Similar Threads
Thread Thread Starter Forum Replies Last Post
Code works in Excel VBA but not Access VBA fossx Access VBA 2 May 21st, 2007 08:00 AM
Running stored procedure in Access VBA Bryon Burbage Access VBA 0 July 21st, 2006 09:14 AM
too few variables when running sql qry through vba Christaaay Access 2 December 19th, 2005 04:21 PM
Running Excel VBA Macros shattered Visual Basic 2005 Basics 0 November 14th, 2005 06:07 AM
Running an SQL query in VBA... Augusta Access VBA 3 December 1st, 2004 05:17 AM





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