I am trying to write the unbound form to the database now using the same kind of loop.
Code:
Dim DBSS As Database
Dim rs As DAO.Recordset
Dim i As Integer
Set DBSS = CurrentDb
Set rs = CurrentDb.OpenRecordset("SELECT * FROM [Attendance]")
With rs
.AddNew
For i = 1 To 25
!ADate = Me.Text0.Value
!EXP_ID = Me.Controls("name" & i).Value
!Attended = Me.Controls("attend" & i).Value
Next i
.Update
End With
r.Close
Set rs = Nothing
DoCmd.Close
End Sub
and I am getting an error...
Run-time error '438':
Object doesn't support this property or method
when debugged it highlights:
Code:
!EXP_ID = me.controls("name" & i).value
Thanks for your help!