J
Jose
I've recently upgraded my system from Office 2003 to Office 2007. I have an
existing application that I am modifying. I'm adding a button on a form to
add a new record to a table. I've done this type of thing many times in the
past with no problem. In fact, I have very similar code for another table in
this same form.
I get an error saying "The Item Is Not In This Collection". I have checked
several times for the spelling of field names and field content and all seems
okay. What does this error mean? Is there a list of error messages and
definitions somewhere? This would be helpful in the future as well.
This is the code:
Dim MYDB As Database
Dim OutTemp As Recordset
Set MYDB = CurrentDb
Set OutTemp = MYDB.OpenRecordset("tblMenuPlanWork", dbOpenTable)
OutTemp.AddNew
OutTemp![RecipeId] = Me![RecipeId]
OutTemp![RecipeName] = Me![Name]
OutTemp![WeekStartDate] = "08/31/2008"
OutTemp![DayOfWeek] = "1-Sunday"
OutTemp![TimeOfDay] = "Supper"
OutTemp![Course] = "4-Entree"
OutTemp.Update
OutTemp.Close
-- Any help would be greatly appreciated!
Jose
Winneconne, WI
existing application that I am modifying. I'm adding a button on a form to
add a new record to a table. I've done this type of thing many times in the
past with no problem. In fact, I have very similar code for another table in
this same form.
I get an error saying "The Item Is Not In This Collection". I have checked
several times for the spelling of field names and field content and all seems
okay. What does this error mean? Is there a list of error messages and
definitions somewhere? This would be helpful in the future as well.
This is the code:
Dim MYDB As Database
Dim OutTemp As Recordset
Set MYDB = CurrentDb
Set OutTemp = MYDB.OpenRecordset("tblMenuPlanWork", dbOpenTable)
OutTemp.AddNew
OutTemp![RecipeId] = Me![RecipeId]
OutTemp![RecipeName] = Me![Name]
OutTemp![WeekStartDate] = "08/31/2008"
OutTemp![DayOfWeek] = "1-Sunday"
OutTemp![TimeOfDay] = "Supper"
OutTemp![Course] = "4-Entree"
OutTemp.Update
OutTemp.Close
-- Any help would be greatly appreciated!
Jose
Winneconne, WI