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.