and if the procedure is from an object, you can use CallByName. Here, mostly
useless, but just for illustration:
CallByName Application, "Run", VbMethod, "PublicSubroutineNameHere"
since it is the same as
Application.Run "PublicSubroutineNameHere"
but it shows that you CAN supply the name, as string, of a procedure to be
executed on an existing object, here "Run" on the object Application. The
object can be any object (one created by Access, or one created by you, a
from, a report, or from a class).
Vanderghast, Access MVP
"Pendragon" <(E-Mail Removed)> wrote in message
news

C3990AA-EE33-4C23-B5C4-(E-Mail Removed)...
> Access03/WinXP
>
> I've trying to research a solution but nothing has worked. Undoubtedly
> it's
> the way I have set up the code and am trying to call the procedure. Any
> help
> is appreciated.
>
> Module name is CommRun
> In CommRun, I have:
>
> Public Sub CR_Coding()
> On Error GoTo Err_Coding
>
> Dim QtrNo As Long
> Dim strFilter As String, ssql As String
>
> ....and then a whole series of queries to run....
>
> End Sub
>
> A temp table has records for groups, each of which has a specific public
> procedure to run. The code bombs the Call command.
>
> Dim strCRName as String
> Dim db as Database
> Dim rs as Recordset
>
> Set db = CurrentDb
> Set rs = db.OpenRecordset("SELECT * FROM zTemp_CommGrpsToRun")
> rs.MoveFirst
> Do While Not rs.EOF
> With rs
> strCRName = rs("CRName")
> 'MsgBox CRName
> Call strCRName
> .MoveNext
> End With
> Loop
>
> Suggestions??
>
> Thank you!!
>