Have a form w with 40 textboxes and 40 lables and are labled Bay1 - Bay40 T1 - T40. I need to put that data into an ACCESS table On Click event. I keep getting Expected End of statement. The access table is SaveCounts and has three columns - ID(autonumber) Bayno and Count. Here is the code:
Private Sub ExitBtn_Click()
Dim I As Integer
I = 1
For I = 1 To 40
INSERT INTO SaveCounts([Bayno], [Count])
Values(me.controls("Bay"&I),Me.Controls("T"&I))
Next I
End Sub
Thanks in advance.
jpl
Private Sub ExitBtn_Click()
Dim I As Integer
I = 1
For I = 1 To 40
INSERT INTO SaveCounts([Bayno], [Count])
Values(me.controls("Bay"&I),Me.Controls("T"&I))
Next I
End Sub
Thanks in advance.
jpl