473,386 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Changing modules programatically - Is it possible?

Longshot: is there some way to write VBA code which can change the VBA
code of a module in Access? The purpose would be to write "add-ins"
for an in-house product we use. Everyone here uses a sort of
convoluted database that's based on one core database, and some people
are writing their own screens and code to perform functions which have
already been written by others. I'm thinking if we could "modulize"
our functions, then people could just plug what they need into the
database.

I can't find anything online that deals with this so I'm doubting it
can be done, but some of the experts here have proven me wrong in the
past.

Aug 7 '07 #1
2 1419

Odd Random statements, but it might give you a starting point

Dim Rpt As Report
Dim ResultTypeSet As Recordset
Dim SQLStg As String
Dim Mdl As Module
Dim LngValue a Long

'Create the Report
Set Rpt = CreateReport
Set Mdl = Rpt.Module
LngValue = Mdl.CreateEventProc("Format",
Rpt.Section(acGroupLevel1Header).Name)
' Insert text into body of procedure.
Mdl.InsertLines LngValue + 2, vbTab & "Trophy.Caption =
GetTrophyName(Division, 2)"

As far as I remember the whole function created a report using VBA and
inserted the required function on the OnFormat Event

HTH

Phil

"ManningFan" <ma********@gmail.comwrote in message
news:11*********************@g4g2000hsf.googlegrou ps.com...
Longshot: is there some way to write VBA code which can change the VBA
code of a module in Access? The purpose would be to write "add-ins"
for an in-house product we use. Everyone here uses a sort of
convoluted database that's based on one core database, and some people
are writing their own screens and code to perform functions which have
already been written by others. I'm thinking if we could "modulize"
our functions, then people could just plug what they need into the
database.

I can't find anything online that deals with this so I'm doubting it
can be done, but some of the experts here have proven me wrong in the
past.

Aug 7 '07 #2
On Tue, 07 Aug 2007 08:17:21 -0700, ManningFan <ma********@gmail.com>
wrote:

Yes. Look up the Module object and its methods and properties.

-Tom.
>Longshot: is there some way to write VBA code which can change the VBA
code of a module in Access? The purpose would be to write "add-ins"
for an in-house product we use. Everyone here uses a sort of
convoluted database that's based on one core database, and some people
are writing their own screens and code to perform functions which have
already been written by others. I'm thinking if we could "modulize"
our functions, then people could just plug what they need into the
database.

I can't find anything online that deals with this so I'm doubting it
can be done, but some of the experts here have proven me wrong in the
past.
Aug 8 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: John J. Lee | last post by:
I'm trying to change a base class of a big class hierarchy. The hierarchy in question is 4DOM (from PyXML). 4DOM has an FtNode class that defines __getattr__ and __setattr__ that I need to...
0
by: Amos | last post by:
My datagrid is tied to the datatable below and since the datagrid's columns "inherits" the names of the columns when I add them to the grid, I was wondering if it would be possible for me to change...
1
by: Artem Kliatchkine | last post by:
Hi All, HttpRuntime settings such as executionTimeout are normally set in Web.config. Is it possible to change them at runtime? I have a rarely executed method which works long time (sometimes...
2
by: ziad dodin | last post by:
in an application where a feild (for example Name or item description)is to be entered in both ENGLISH and the Local language say ARABIC: the two input locales are installed on my computer;...
1
by: Nick via .NET 247 | last post by:
I have a similar problem trying to use web services with awindows form application. I currently use a static web referencein my project. What I am trying to do is to programaticallychange the url...
8
by: Rak | last post by:
I am looking for a way to programatically change the .net version of the virtual directory that I am creating within a aspx page. As part of creating a new customer in my asp.net 2 application, it...
34
by: samjnaa | last post by:
This is like the previous one. Please check for sanity and approve for posting at python-dev. I would like to have something like "option base" in Visual Basic. IIRC it used to allow me to...
17
by: blufox | last post by:
Hi All, Can i change the execution path of methods in my process at runtime? e.g a()->b()->c()->d()->e() Now, i want execution to be altered at runtime as -
3
by: M. Ali Qureshi | last post by:
Hi, I have a wizard in my aspx page, and i create steps programatically. There are about 8 steps in all. The default text for StepNextButton is "Next". But i want that only in step 4, the next...
1
by: rufusking | last post by:
My requirement is to change the IP Address of local system programatically using .net. IP Address should change to 10.1.2.100, subnet mask = 255.255.255.0, default gateway=10.1.2.1 I have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.