compile error: argument not optional

  • Thread starter Thread starter akemat
  • Start date Start date
A

akemat

Can someone help me figure out what the error is here. When I debug and
compile the .
Code:
 part of Me.[Code] is highlighted.  This is my first post,
I have searched for an answer and I usually have found one in the months that
I have just browsed the board, but I cannot figure this one out.  Thanks in
advance.
------------------------------------------------------------------------------
-----------------------------------------------------------
Private Sub FilterChildForm()

If Me.NewRecord Then
Forms![3Syllabi].DataEntry = True
Else
Forms![3Syllabi].Filter = "[Code] = " & """" & Me.[Code] & """" & "
AND [Section] = " & """" & Me.[Section] & """" & " AND [TermDescrip] = " &
"""" & Me.[TermDescrip] & """"
Forms![3Syllabi].FilterOn = True
End If

End Sub
 
Can someone help me figure out what the error is here. When I debug and
compile the .
Code:
 part of Me.[Code] is highlighted.  This is my first post,
I have searched for an answer and I usually have found one in the months that
I have just browsed the board, but I cannot figure this one out.  Thanks in
advance.
------------------------------------------------------------------------------
-----------------------------------------------------------
Private Sub FilterChildForm()

If Me.NewRecord Then
Forms![3Syllabi].DataEntry = True
Else
Forms![3Syllabi].Filter = "[Code] = " & """" & Me.[Code] & """" & "
AND [Section] = " & """" & Me.[Section] & """" & " AND [TermDescrip] = " &
"""" & Me.[TermDescrip] & """"
Forms![3Syllabi].FilterOn = True
End If

End Sub[/QUOTE]

I think you're going to have trouble with your naming convention.  "Section" is
definitely a reserved word and I suspect "Code" is as well.
 
Back
Top