Hi
I got this code set up for a not in list event. It works pretty well but I can't figure out how to make the new value available after entry. I've tried to requery, recalc and refresh on the on focus, on current and on activate commands but can't seem to get my groove on. The form I'm working on is named "LedgerForm" and it remains open during the opening of "frmPayee" right now. Here's my code. I'm really new at VBA so I apologize.
Private Sub PayeeID_NotInList(NewData As String, Response As Integer)
Response = acDataErrContinue
Dim Answer As Integer
Answer = MsgBox("Do you want to add " & NewData & " as a new payee?", vbYesNo, "Add new payee?")
If Answer = vbYes Then
DoCmd.OpenForm ("frmpayee"), , , , acFormAdd
Forms.frmPayee.payee = NewData
Else
Me.PayeeID.Value = Null
End If
End Sub
Thanks
Lefty