Hi There,
Newbie here, trying to help out a school who have MS Access 2003. I usually program in C+.
They want a button to add a new record however I am getting the error mentioned in the title above.
The table shows:
DailyReportID autonumber (Primary Key)
fkStudCourID number (derived from another table for Student Course ID)
datDlyReportDate (should be obvious)
txtDailyCode text
numDailyNum number
But as soon as I click the button it says:
Compile error: Method or data member not found
What am I doing wrong? Here is the code:
If I comment out that line everything else works?!?
Please help a Noob.
Newbie here, trying to help out a school who have MS Access 2003. I usually program in C+.
They want a button to add a new record however I am getting the error mentioned in the title above.
The table shows:
DailyReportID autonumber (Primary Key)
fkStudCourID number (derived from another table for Student Course ID)
datDlyReportDate (should be obvious)
txtDailyCode text
numDailyNum number
But as soon as I click the button it says:
Compile error: Method or data member not found
What am I doing wrong? Here is the code:
Code:
Dim db As Database
Set db = CurrentDb
Dim rs As DAO.Recordset
With rs
.AddNew
!fkStudCourID = Me.fkStudCourID
...
!numDailyNum = Nz(Me.numDailyNum, 0) + 1
!datDlyReportDate = Date
.Update
End With
If I comment out that line everything else works?!?
Please help a Noob.