Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compile Error-Expected variable or procedure, not module 1

Status
Not open for further replies.

ajaeger

Technical User
Feb 6, 2003
201
US
I have a command button that when clicked calls a procedure. I'm getting the following error:

"Compile Error
Expected variable or procedure, not module"

The code for the button is:

Private Sub cmdChangesToRCEvals_Click()
Call ChangesToRCEvals
End Sub

The code for the module is:

Public Sub ChangesToRCEvals()
Dim strSQL As String
DoCmd.SetWarnings False
strSQL = "Delete from AssignedEvaluators"
DoCmd.RunSQL strSQL
DoCmd.SetWarnings True
EndSub

I have this same structure in other areas and it works. Any suggestions?

Thanks.

Anna Jaeger
iMIS Database Support
 
Hi!

What is the name of the module that the function is in? If it is the same as the function then change it by adding mdl in front of it.

hth


Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top