Re: Compile error:Method or data member not found

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: jh (jh_at_discussions.microsoft.com)
Date: 03/18/05


Date: Fri, 18 Mar 2005 14:11:03 -0800

Thank you, Wayne. Changing "." to "!" worked. What is the difference
beween them two anyways?

Also, now I got the error message "no current records". The programs stopped
at "rstMatch.MoveFirst".

Private Sub ResetMatchFile() ' DELETE ALL RECORDS IN THE PREVIOUS FILE
   Dim db As DAO.Database
   Dim rstMatch As DAO.Recordset
  
   Set db = CurrentDb() ' OPEN THE MATCH FILE
   Set rstMatch = db.OpenRecordset("tDonorStudMatch", dbOpenDynaset)
  ' DELETE THE PREVIOUS RECORDS
      rstMatch.MoveFirst
   Do Until rstMatch.EOF
      rstMatch.Delete
      rstMatch.MoveNext
   Loop ' Do while cnt < max
   rstMatch.CLOSE

Thank you.

 

"Wayne Morgan" wrote:

> You were correct to change the Public statement to DAO.Recordset instead of
> just Recordset. You may also try changing the Dim statement for db to
> DAO.Database.
>
> To get rid of the error, first check for spelling errors. After that, try a
> ! instead of a .
>
> pAcctNum = rstDonor!ACCT_NUM
>
> --
> Wayne Morgan
> MS Access MVP
>
>
> "jh" <jh@discussions.microsoft.com> wrote in message
> news:98974F26-1CB4-40D0-ACDC-E40C794B5849@microsoft.com...
> >I am working on a program which was written in Ms Access 97 and since then
> > has been converted to Ms Access 2002. I remember that I got the error
> > message about missing reference of dao2535.tlb versaion3.5 when I did the
> > conversion. I got the Microsoft DAO 3.6 to take care of that problem.
> >
> > But now I got the subject error message when I tried to run the program.
> > The program stopped at the ACCT_NUM of "pAcctNum = rstDonor.ACCT_NUM".
> >
> >
> >
> > Private Sub VerifyDonorCriteria() ' GET DONOR'S SCHOLARSHIP CRITERIA
> > Dim aSwitches(24) As String
> > For iX = 1 To 24
> > aSwitches(iX) = " " ' clear the 24 switches
> > Next
> >
> > Dim iMajorCnt As Integer
> > Dim db As Database
> > Set db = CurrentDb() ' GET DONOR
> > Set rstDonor = db.OpenRecordset("tDonorMaster", dbOpenDynaset)
> > sDonorArg = "Acct_Num = '" & txtAcctNum & "'" 'set the donor file to
> > this
> > donor
> > rstDonor.FindFirst sDonorArg
> >
> > pAcctNum = " " ' save these for the report
> > pAcctName = " "
> > pAcctNum = rstDonor.ACCT_NUM
> > pAcctName = rstDonor.ACCT_NAME
> >
> >
> > The recordset was defined as follows:
> >
> > Option Compare Database ' THIS MATCHES A DONOR TO ITS STUDENTS - 2/2001
> > Option Explicit ' 2/2001 Changed birth city to VISA
> > Option Base 1 ' sets 1st element of array to 1
> > Public rstDonor As Recordset
> >
> > I changed the recordset to read DAO.recordset but it did not get rid of
> > the
> > error message.
> >
> > I am not sure if this has anything to do with the problem: the table
> > 'tDonorMaster' is residing in a separate mdb and is linked to this program
> > mdb.
> >
> > Thank you in advance.
> >
> >
> >
> >
> >
>
>
>



Relevant Pages

  • Recordset based on a SQL string gives Too few parameters error -- Access97
    ... I am trying to restrict a recordset to those records which concern a ... Dim rs As DAO.Recordset ... This seems to be referring to the three fields specified in the WHERE ... WHERE statement out, I do not get an error message, and if I reduce the ...
    (microsoft.public.access.formscoding)
  • Re: Compile error:Method or data member not found
    ... You were correct to change the Public statement to DAO.Recordset instead of ... You may also try changing the Dim statement for db to ... > But now I got the subject error message when I tried to run the program. ... > The recordset was defined as follows: ...
    (microsoft.public.access.gettingstarted)
  • Re: Query in VBA Type Mismatch
    ... You're likely getting an ADO recordset, ... error message is highlighting. ... The exact error I get is Run Time Error 13, Type Mismatch ... Dim rs As DAO.Recordset ...
    (microsoft.public.access.queries)
  • RT Error 13 with Recordset
    ... I'm trying to connect to an Access 2000 DB recordset from VB6 SP6a, ... and I keep getting the following error message: ... Dim rst As Recordset ...
    (microsoft.public.vb.database.dao)
  • Re: access 2003
    ... Dim ctl As Control ... Dim rs As Recordset ... This sets the query definitions for choosing data to create an invoice using ... Event on combo box: Private Sub ChooseCust_AfterUpdate ...
    (microsoft.public.access.conversion)