Re: Compile error:Method or data member not found
From: jh (jh_at_discussions.microsoft.com)
Date: 03/18/05
- Next message: EmtSupplies: "Drop down entry fields in forms"
- Previous message: Wayne Morgan: "Re: Compile error:Method or data member not found"
- In reply to: Wayne Morgan: "Re: Compile error:Method or data member not found"
- Next in thread: Wayne Morgan: "Re: Compile error:Method or data member not found"
- Reply: Wayne Morgan: "Re: Compile error:Method or data member not found"
- Messages sorted by: [ date ] [ thread ]
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.
> >
> >
> >
> >
> >
>
>
>
- Next message: EmtSupplies: "Drop down entry fields in forms"
- Previous message: Wayne Morgan: "Re: Compile error:Method or data member not found"
- In reply to: Wayne Morgan: "Re: Compile error:Method or data member not found"
- Next in thread: Wayne Morgan: "Re: Compile error:Method or data member not found"
- Reply: Wayne Morgan: "Re: Compile error:Method or data member not found"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|