I have a split form used in the data entry process for school teachers. The data is related to students test taking and progress monitoring. Generally, there is a test date and some other information. The important point here is the test date is always the first field of the form and the focus is set to that date. This is also a mandatory field because reporting and graphing is driven off of the date field.
So a teacher sits at their desk, starts-up the application, finds a student, and navigates to the desired form. The teacher may have three sets of results to add for that student. I put an ADD RECORD button on the form. It inserts a record into the desired table using the known keys from the form and all other fields are blank for data entry.
The code for the Add Record push button is below.
Dim dbs As Database
Dim rst As Recordset
Dim StrSQL100 As String
Dim ThisTerm As String
Dim SchYr As String
Dim StdID As Integer
Dim TchID As Integer
Dim SchID As Integer
Dim SchYrID As Integer
StdID = Me!StudentID
TchID = Me!TeacherID
SchID = Me!SchoolID
SchYrID = Me!SchoolYearID
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("NewTerm", dbOpenTable)
ThisTerm = rst!Term
StrSQL100 = "INSERT INTO FountasP(StudentID, StudentName, TeacherID, SchoolID, SchoolYearID, SchoolYear, Term, Grade)" _
& "VALUES(" & Me!StudentID & ",'" & Me!StudentName & "'," & Me!TeacherID & "," & Me!SchoolID & "," _
& Me!SchoolYearID & ",'" & Me!SchoolYear & "', '" & ThisTerm & "','" & Me!Grade & "');"
DoCmd.SetWarnings False
DoCmd.RunSQL StrSQL100
Me.Requery
DoCmd.GoToControl ("DateAdmin")
DoCmd.SetWarnings True
MsgBox "Record Added!"
rst.Close
dbs.Close
Set rst = Nothing
Set dbs = Nothing
ALL WORKS WELL, up to a point!
A teacher called me and indicated after the addition of a new record, no data can be entered. When I looked at the form, I can navigate from field to field but cannot enter data. This is/will be an interesting
problem. The code was simply straightforward for the addition of blank rows to be used for a particular student's data entry. Not sure where else to look?
The questions is, how to release the form for data entry? It appears to be frozen. All fields can be navigated to but, no data can be entered?
Your attention to this problem will be appreciated. - Jim