I would like to display the area within a code module where certain text appears.
The module concerned has numerous lines containing code such as:
If x Then AddErr 35
If y then AddErr 45
etc etc
The code below works (from a form or other module)
Dim l1 as long, l2 as long, c1 as long, c2 as long
Dim bolFound as Boolean
Dim mdl as module
DoCmd.OpenModul e "modProcessingB S"
Set mdl = Modules("modPro cessingBS")
bolFound = mdl.Find("AddEr r 35", l1, c1, l2, c2, True)
debug.print bolFound
Always bolFound is True, but the module display is where it was last opened, not where the line containing "AddErr 35" is to be found. I swear that earlier today Access did exactly this, but no longer. Frustrating. Can anyone help?
I am using Access 2002 - although I doubt it makes much difference!
Many thanks to anyone who can help!
The module concerned has numerous lines containing code such as:
If x Then AddErr 35
If y then AddErr 45
etc etc
The code below works (from a form or other module)
Dim l1 as long, l2 as long, c1 as long, c2 as long
Dim bolFound as Boolean
Dim mdl as module
DoCmd.OpenModul e "modProcessingB S"
Set mdl = Modules("modPro cessingBS")
bolFound = mdl.Find("AddEr r 35", l1, c1, l2, c2, True)
debug.print bolFound
Always bolFound is True, but the module display is where it was last opened, not where the line containing "AddErr 35" is to be found. I swear that earlier today Access did exactly this, but no longer. Frustrating. Can anyone help?
I am using Access 2002 - although I doubt it makes much difference!
Many thanks to anyone who can help!
Comment