G
Guest
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.
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.