sam1fletcher
Registered User.
- Local time
- Today, 08:11
- Joined
- Jan 28, 2013
- Messages
- 40
I have been trying to add records to table from a form and got a runtime error item not found in this collection. The bale is linked to another table like this: tlbSchool"one------->"many" tblContacts(table im inserting data) and bothe have a feild school and that is the line flagged up for error in this code
Any ideas how to get around this
Code:
Dim Contacts As DAO.Database
Dim Cont As DAO.Recordset
Set Contacts = CurrentDb
Set Cont = Contacts.OpenRecordset("tblContacts")
Cont.AddNew
Cont("ContactFirstName").Value = Me.FirstName.Value
Cont("ContactSurname").Value = Me.Surname.Value
Cont("School").Value = Me.SchoolName.Value
Cont("JobTitle").Value = Me.FirstName.Value
Cont("Email").Value = Me.EmailAddress.Value
Cont("Sport1Involved").Value = Me.SportInolved.Value
Cont("Padsis").Value = Me.Padsis.Value
Cont.Update
Any ideas how to get around this