Adjusted/formatted code to show indenting (orange)
Code:
Private Sub StarsID_NotInList(NewData As String, Response As Integer)
Dim ans As Integer
Response = acDataErrContinue
ans = MsgBox("Do you want to add this Star?", vbYesNo, " A D D N E W S T A R ")
Select Case ans
Case vbNo
Case vbYes
DoCmd.OpenForm ("frmStars"), , , , acFormAdd
Forms!frmStars.txtStarName = NewData
DoCmd.RunCommand acCmdSaveRecord
DoCmd.Close acForm, "frmStars"
Response = acDataErrAdded
Case Else
End Select
End Sub
?accesserror(2465)
Microsoft Access can't find the field '|1' referred to in your expression.@You may have misspelled the field name, or the field may have been renamed or deleted.@@1@1@11730@1
Can you show us the actual calling code (with values) that fails?