NoMatch

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My version of Access 2003 cannot read the code "NoMatch". Does anyone how I
can make access recognize this code?
 
What's your code that's failing, and what's the exact error message?
 
Error Message:

Comple Error:
Method or Data Member not found

Code:
Function UpdateToc(TocEntry As String, Rpt As Report)

' Called from the OnPrint property of the section containing
' the Table Of Contents entry. Updates the Table Of Contents
' entry.

toctable.Seek "=", TocEntry

If toctable.NoMatch Then <------Error Line
toctable.AddNew
toctable!Description = TocEntry
toctable![page number] = Rpt.Page
toctable.Update
End If

End Function


Thanks for the help.
 
What is toctable? (How have you declared it, and where?)

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


PerplexedinKY said:
Error Message:

Comple Error:
Method or Data Member not found

Code:
Function UpdateToc(TocEntry As String, Rpt As Report)

' Called from the OnPrint property of the section containing
' the Table Of Contents entry. Updates the Table Of Contents
' entry.

toctable.Seek "=", TocEntry

If toctable.NoMatch Then <------Error Line
toctable.AddNew
toctable!Description = TocEntry
toctable![page number] = Rpt.Page
toctable.Update
End If

End Function


Thanks for the help.

Douglas J. Steele said:
What's your code that's failing, and what's the exact error message?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
 
Option Explicit

Dim da As DAO.Database
Dim toctable As DAO.Recordset
Dim intpagecounter As Integer

Douglas J. Steele said:
What is toctable? (How have you declared it, and where?)

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


PerplexedinKY said:
Error Message:

Comple Error:
Method or Data Member not found

Code:
Function UpdateToc(TocEntry As String, Rpt As Report)

' Called from the OnPrint property of the section containing
' the Table Of Contents entry. Updates the Table Of Contents
' entry.

toctable.Seek "=", TocEntry

If toctable.NoMatch Then <------Error Line
toctable.AddNew
toctable!Description = TocEntry
toctable![page number] = Rpt.Page
toctable.Update
End If

End Function


Thanks for the help.

Douglas J. Steele said:
What's your code that's failing, and what's the exact error message?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


message
My version of Access 2003 cannot read the code "NoMatch". Does anyone
how
I
can make access recognize this code?
 

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

Similar Threads

NoMatch Property 1
Correct error message 3
compile error 5
Syntax error 3
Protection Assistance 2
Load Form on Specific Date 8
Clone Code Complication 2
New Record 8

Back
Top