compile error: argument not optional

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
 
R

RD

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top