P
Pele
Somebody had helped me put together a VB code to add some textboxes from a
form to a table. Anyway, I get an error message when the code reaches the
first line of the code below; a message pops up and says "Item not found". I
am convnced it has to do with the spaces in the name of the table referred to
in the code. Can somebody tell me how to use a table name that has spaces in
a code. It is not an option for me to change the table name; I have to find a
way to let the code recognize the table name.
Pele
Set rst = CurrentDb.OpenRecordset("Head count extra time tbl")
With rst
For i = SW To EW
' Add new record.
.AddNew
!hc_id = varHDCT
!Week = i
![Meetings and training st] = Me.ST 'ub =
unbound
![Meetings and training ot] = Me.OT
![Unscheduled OT] = Me.Unsched_OT
'save the record
.Update
Next
End With
form to a table. Anyway, I get an error message when the code reaches the
first line of the code below; a message pops up and says "Item not found". I
am convnced it has to do with the spaces in the name of the table referred to
in the code. Can somebody tell me how to use a table name that has spaces in
a code. It is not an option for me to change the table name; I have to find a
way to let the code recognize the table name.
Pele
Set rst = CurrentDb.OpenRecordset("Head count extra time tbl")
With rst
For i = SW To EW
' Add new record.
.AddNew
!hc_id = varHDCT
!Week = i
![Meetings and training st] = Me.ST 'ub =
unbound
![Meetings and training ot] = Me.OT
![Unscheduled OT] = Me.Unsched_OT
'save the record
.Update
Next
End With