A
Andrea
Let me say first of all I am a newbie and know little about actual
coding, mostly self taught. I have developed a database that I use to
track employee records. I use this database among other things to
record attendance and to track staff paid time off that is based on
their career appointment, i.e. 100% to 50%. Each employee accrues 4 to
8 hours of PTO on a monthly basis. I have a tblEmployee,tblAccrual and
a tblPP (Pay Period)that I want to use to calculate this accrual.
Employees may change from full time to part time or per diem (often
do). I need a way to match PTO accrual rate according to career
appointment in any given pay period. I am trying to develop code to
create recordsets to store the accrued PTO by pay period. When I run
the code which I have attached to the OnClick property of a button, I
get error message number 3061 "too few parameters. 1 expected". I
can't figure out what to do about it. I would appreciate any help you
could provide on this. Thanks in advance.
This is what I have so far:
Private Sub cmdAccrual_Click()
On Error GoTo Err
Dim db As database
Dim rstAccrual As DAO.Recordset
Dim rstPP As DAO.Recordset
Dim rstEmployee As DAO.Recordset
Set db = CurrentDb
Set rstAccrual = db.OpenRecordset("SELECT * FROM tblAccrual",
dbOpenDynaset)
Set rstPP = db.OpenRecordset("Select * from tblPP where
((tblPP.[current?])=False)", dbOpenDynaset)
Do Until rstPP.EOF
rstPP.MoveNext
Loop
Quit:
Exit Sub
Err:
Call Error
Resume Quit
End Sub
coding, mostly self taught. I have developed a database that I use to
track employee records. I use this database among other things to
record attendance and to track staff paid time off that is based on
their career appointment, i.e. 100% to 50%. Each employee accrues 4 to
8 hours of PTO on a monthly basis. I have a tblEmployee,tblAccrual and
a tblPP (Pay Period)that I want to use to calculate this accrual.
Employees may change from full time to part time or per diem (often
do). I need a way to match PTO accrual rate according to career
appointment in any given pay period. I am trying to develop code to
create recordsets to store the accrued PTO by pay period. When I run
the code which I have attached to the OnClick property of a button, I
get error message number 3061 "too few parameters. 1 expected". I
can't figure out what to do about it. I would appreciate any help you
could provide on this. Thanks in advance.
This is what I have so far:
Private Sub cmdAccrual_Click()
On Error GoTo Err
Dim db As database
Dim rstAccrual As DAO.Recordset
Dim rstPP As DAO.Recordset
Dim rstEmployee As DAO.Recordset
Set db = CurrentDb
Set rstAccrual = db.OpenRecordset("SELECT * FROM tblAccrual",
dbOpenDynaset)
Set rstPP = db.OpenRecordset("Select * from tblPP where
((tblPP.[current?])=False)", dbOpenDynaset)
Do Until rstPP.EOF
rstPP.MoveNext
Loop
Quit:
Exit Sub
Err:
Call Error
Resume Quit
End Sub