Initially I solved this by making sure there was a blank row when the table was created so it wasn't trying to set the textbox with a null value... and it worked
... but now it doesn't
The line in red text is the offending code - any thoughts?


Code:
Private Sub Form_Load()
'Dim t As TextBox
tsPage = 1
ln = Me.Controls.Count
oa = Split(Me.OpenArgs, ";")
oa0 = oa(0)
oa1 = oa(1)
oa2 = oa(2)
'Determine number of days in month oa2 and the first day of the week
daysInMonth = DateSerial(Year(oa2), Month(oa2) + 1, 1) - DateSerial(Year(oa2), Month(oa2), 1)
firstWeekDay = Weekday(oa2, vbSunday)
Set db = CurrentDb
Set rs1 = CurrentDb.OpenRecordset(oa0 & "_1")
Set rs2 = CurrentDb.OpenRecordset(oa0 & "_2")
curDay = 1
For i = 1 To 7
If i >= firstWeekDay Then
Me.Controls("lblDay" & i).Caption = Month(oa2) & "/" & curDay & "/" & Year(oa2)
For j = 7 To 19
MsgBox rs1.Fields(curDay & "0" & j)
If j < 10 Then
[COLOR=red]Me.Controls("tb" & i & j) = rs1.Fields(curDay & "0" & j)
[/COLOR] Else
Me.Controls("tb" & i & j) = rs1.Fields(curDay & j)
End If
Next j
curDay = curDay + 1
Else
For j = 7 To 19
Me.Controls("tb" & i & j).Enabled = False
Next j
End If
Next i
For Each c In Me.Controls
If TypeOf c Is TextBox Then
If c.Name = "tbDate" Or c.Name = "tbEmpName" Or c.Name = "tbOa0" Or c.Name = "tbOa1" Or c.Name = "tbOa2" Or c.Name = "tbtsPage" Then
Else
If inner = 20 Then
inner = 7
outer = outer + 1
End If
c.OnGotFocus = "=gotFocus('" & c.Name & "')"
c.OnLostFocus = "=lostFocus('" & c.Name & "')"
c.OnClick = "=click('" & c.Name & "')"
c.afterUpdate = "=update('" & c.Name & "')"
inner = inner + 1
End If
End If
Next
'Assign values to employee name and date
oa2 = MonthName(Month(oa2)) & " " & Year(oa2)
tbEmpName.value = oa1
tbDate.value = oa2
End Sub