By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,484 Members | 1,764 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,484 IT Pros & Developers. It's quick & easy.

I want to examine each procedure in my class modules and standard modules (A97)

P: n/a
MLH
Have a look at the procedure below. In particular, note lines 1 and
21...

Private Sub JudHrngReqBtn_Click()
On Error GoTo Err_JudHrngReqBtn_Click
Dim ThisForm As String
ThisForm = Me.Name

Dim DocName As String
DocName = "frmJudicialHearingRqstNotice"
DoCmd.OpenForm DocName, , , , A_EDIT, , CStr(ThisForm)
Me.Visible = 0

Exit_JudHrngReqBtn_Click:
Exit Sub

Err_JudHrngReqBtn_Click:
Dim r As String, k As String, Message3 As String
r = "The following unexpected error occurred in Sub
JudHrngReqBtn_Click, CBF on " & ThisForm & "."
k = CRLF & CRLF & Str$(Err) & ": " & Quote & Error$ & Quote
Message3 = r & k
MsgBox Message3, 48, "Unexpected Error - " & MyApp$ & ", rev. " &
MY_VERSION$
Resume Exit_JudHrngReqBtn_Click

End Sub
Now, here are lines #1 and #21 excerpted...
Private Sub JudHrngReqBtn_Click()
r = "The following unexpected error occurred in Sub
JudHrngReqBtn_Click, CBF on " & ThisForm & "."

How can I examine each and every one of my procedures to ensure
that procedure name (shown in line #1) is referenced by hard coding
it into line #21. I would have to have code that enumerates all my
procedures, reads the procedure name and make CERTAIN that is
is typed into the r=blah, blah, blah line. Of course, that line won't
always be line #21 (obviously). This objective, I'm afraid, will not
be easily achieved in MS Access 97. Am I right?
Nov 13 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
On Tue, 26 Jul 2005 14:51:30 -0400, MLH <CR**@NorthState.net> wrote:

"

How can I examine each and every one of my procedures to ensure
that procedure name (shown in line #1) is referenced by hard coding
it into line #21. I would have to have code that enumerates all my
procedures, reads the procedure name and make CERTAIN that is
is typed into the r=blah, blah, blah line. Of course, that line won't
always be line #21 (obviously). This objective, I'm afraid, will not
be easily achieved in MS Access 97. Am I right?

Error-handling inserts is the sort of thing a template or wizard should be able to put into code.
There are a number of tools available for VB but I don't know of one for Access and
as usual searching Google is not helped by MS having chosen such a common word as
"Access" for the name.
Maybe someone will post a tool or link which can do it for you.

If you do it by code (as opposed to have a wizard which sets things up when you
insert a new function) you could also deal with functions which already have the code in them,
but possibly incorrectly eg if the function name has changed or something has been deleted.
You would only need to put the function name once into each function as you could make it
a named constant.
Look at the properties of the module object. This will keep you busy for a bit!

Nov 13 '05 #2

P: n/a
Lyn
On 27 Jul 2005 06:55:04 -0500, polite person wrote:
On Tue, 26 Jul 2005 14:51:30 -0400, MLH <CR**@NorthState.net> wrote:

"

How can I examine each and every one of my procedures to ensure
that procedure name (shown in line #1) is referenced by hard coding
it into line #21. I would have to have code that enumerates all my
procedures, reads the procedure name and make CERTAIN that is
is typed into the r=blah, blah, blah line. Of course, that line won't
always be line #21 (obviously). This objective, I'm afraid, will not
be easily achieved in MS Access 97. Am I right?

Error-handling inserts is the sort of thing a template or wizard should be able to put into code.
There are a number of tools available for VB but I don't know of one for Access and
as usual searching Google is not helped by MS having chosen such a common word as
"Access" for the name.
Maybe someone will post a tool or link which can do it for you.

If you do it by code (as opposed to have a wizard which sets things up when you
insert a new function) you could also deal with functions which already have the code in them,
but possibly incorrectly eg if the function name has changed or something has been deleted.
You would only need to put the function name once into each function as you could make it
a named constant.
Look at the properties of the module object. This will keep you busy for a bit!


This tool package may help: www.mztools.com/v3/mztools3.htm

I use a customized template in this package to standardize the format all
new procedures.

Lyn.
Nov 13 '05 #3

P: n/a
MLH
OK. Many thanks. I will explore properties of module object for a bit.
Error-handling inserts is the sort of thing a template or wizard should be able to put into code.
There are a number of tools available for VB but I don't know of one for Access and
as usual searching Google is not helped by MS having chosen such a common word as
"Access" for the name.
Maybe someone will post a tool or link which can do it for you.

If you do it by code (as opposed to have a wizard which sets things up when you
insert a new function) you could also deal with functions which already have the code in them,
but possibly incorrectly eg if the function name has changed or something has been deleted.
You would only need to put the function name once into each function as you could make it
a named constant.
Look at the properties of the module object. This will keep you busy for a bit!


Nov 13 '05 #4

P: n/a
MLH
Thank-you. I wrote them asking if the MZ-Tools product supported
Access 97 running on a Win XP machine. Am awaiting their response.
Nov 13 '05 #5

P: n/a
MLH
Hi Michael,

MZ-Tools is a COM-addin and unfortunately Access 97 does not support
COM add-ins. Access 2000 or higher is required.

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and
VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

Nov 13 '05 #6

P: n/a
You will save yourself a good deal of time and effort if you license a third
party tool to search the entire database for the string of interest. Two
that I have used in the past, both of which worked, were (my favorite)
"Speed Ferret" from http://www.moshannon.com and (a close second) "Find and
Replace" by Rick Fisher http://www.rickworld.com. You might also check to
see if MVP Arvin Meyer has a tool for this purpose at
http://www.datastrat.com -- freebies but officially unsupported.

Larry Linson
Microsoft Access MVP

"MLH" <CR**@NorthState.net> wrote in message
news:u2********************************@4ax.com...
Have a look at the procedure below. In particular, note lines 1 and
21...

Private Sub JudHrngReqBtn_Click()
On Error GoTo Err_JudHrngReqBtn_Click
Dim ThisForm As String
ThisForm = Me.Name

Dim DocName As String
DocName = "frmJudicialHearingRqstNotice"
DoCmd.OpenForm DocName, , , , A_EDIT, , CStr(ThisForm)
Me.Visible = 0

Exit_JudHrngReqBtn_Click:
Exit Sub

Err_JudHrngReqBtn_Click:
Dim r As String, k As String, Message3 As String
r = "The following unexpected error occurred in Sub
JudHrngReqBtn_Click, CBF on " & ThisForm & "."
k = CRLF & CRLF & Str$(Err) & ": " & Quote & Error$ & Quote
Message3 = r & k
MsgBox Message3, 48, "Unexpected Error - " & MyApp$ & ", rev. " &
MY_VERSION$
Resume Exit_JudHrngReqBtn_Click

End Sub
Now, here are lines #1 and #21 excerpted...
Private Sub JudHrngReqBtn_Click()
r = "The following unexpected error occurred in Sub
JudHrngReqBtn_Click, CBF on " & ThisForm & "."

How can I examine each and every one of my procedures to ensure
that procedure name (shown in line #1) is referenced by hard coding
it into line #21. I would have to have code that enumerates all my
procedures, reads the procedure name and make CERTAIN that is
is typed into the r=blah, blah, blah line. Of course, that line won't
always be line #21 (obviously). This objective, I'm afraid, will not
be easily achieved in MS Access 97. Am I right?

Nov 13 '05 #7

P: n/a
MLH
Well, how about this approach, can anyone offer me a suggestion
here...

I could quickly do the job myself if I could somehow get all of my
lines of code into a table. I could live with truncating code lines
over 255 chars long - no problem. Can someone tell me how I
can DUMP all my standard and class modules into an Access
table for standard text based observation and study?

Subject: I want to examine each procedure in my class modules and
standard modules (A97)
Nov 13 '05 #8

P: n/a
I have put a piece of my code library on my site for this purpose. It's
USysPatch, under Code Modules.

These routines create a table and put all code inside. Call
createSigsTable first (once), it sets up the table; then, call gatherSigs.

As a bonus, a table will be built with all code calls from inside code.
If that is too much for you, use only the EnumDatabase calls from
gatherSigs.

There is a little more to the code; I put sparse comments inline.

MLH wrote:
Well, how about this approach, can anyone offer me a suggestion
here...

I could quickly do the job myself if I could somehow get all of my
lines of code into a table. I could live with truncating code lines
over 255 chars long - no problem. Can someone tell me how I
can DUMP all my standard and class modules into an Access
table for standard text based observation and study?

Subject: I want to examine each procedure in my class modules and
standard modules (A97)


--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
For human replies, replace the queue with a tea

Nov 13 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.