gregarican
IS-IT--Management
I have an Access Form I'm using for an employee performance survey. Each employee is rated in 11 categories on a rating scale from 1-9. Rather than have each employee come up per category on a single form (equaling 11 forms per each employee rated!) I have changed the form to be continuous so the form displays all 11 categories being scored for each employee. I have disabled scrolling and other window modifications to keep the form pretty stationary. The form advance button is something I am manually coding.
I've been able to get around the unbound option group used for scoring by posting the results to a temp table. That's not a problem. The problem is when I try to advance exactly 11 records so that the previous employee goes off the continuous form and the next one comes up with their 11 records.
Declaring a PageCounter variable at the start of the form's code here's how I tried it:
PageCounter = PageCounter + 1
' Post the scoring from the temp table for the real responses
CurrentDb.Execute "INSERT INTO dbo_TblResponses SELECT * FROM TblDummy"
DoCmd.SetWarnings (WarningsOff)
' Flush the temp table for the next employee being scored
CurrentDb.Execute "delete from TblDummy"
' Try to advance to the next 11 set of categories to be scored
DoCmd.GoToRecord , , acGoTo, (PageCounter * 12)
Me.Refresh
The first form advances just down a single record so that record 12 is at the bottom of the form (rather than at the top). Subsequent advances are 12 records forward but now the count is off one so the pagination is all messed up.
Any ideas or suggestions?
I've been able to get around the unbound option group used for scoring by posting the results to a temp table. That's not a problem. The problem is when I try to advance exactly 11 records so that the previous employee goes off the continuous form and the next one comes up with their 11 records.
Declaring a PageCounter variable at the start of the form's code here's how I tried it:
PageCounter = PageCounter + 1
' Post the scoring from the temp table for the real responses
CurrentDb.Execute "INSERT INTO dbo_TblResponses SELECT * FROM TblDummy"
DoCmd.SetWarnings (WarningsOff)
' Flush the temp table for the next employee being scored
CurrentDb.Execute "delete from TblDummy"
' Try to advance to the next 11 set of categories to be scored
DoCmd.GoToRecord , , acGoTo, (PageCounter * 12)
Me.Refresh
The first form advances just down a single record so that record 12 is at the bottom of the form (rather than at the top). Subsequent advances are 12 records forward but now the count is off one so the pagination is all messed up.
Any ideas or suggestions?