In response to your question no there is no command for this.
You could use the NotInList event without the need to use your popup.
The users enters a StyleID.
If the entry is not in the list a message box is displayed
The user selects YES and the StyleID is added to the table.
You may have to change tbl_Styles to the name of the table that hold the
StyleID.
Private Sub StyleID_NotInList(NewData As String, Response As Integer)
Dim strmsg As String
Dim rsy As DAO.Recordset
Dim db As DAO.Database
strmsg = "'" & UCase$(NewData) & "' is not in the list. "
strmsg = strmsg & "Would you like to add this Style ? "
If vbNo = MsgBox(strmsg, vbYesNo + vbQuestion, " New StyleID") Then
resposne = acDataErrDisplay
Else
Set db = CurrentDb()
Set rst = db.OpenRecordset("tbl_styles")
rst.AddNew
rst("StyleID") = UCase$(NewData)
rst.Update
Response = acDataErrAdded
End If
End Sub
--
Allan Murphy
Email:
(E-Mail Removed)
"ElizCat" <(E-Mail Removed)> wrote in message
news:721AF7E4-4B95-4766-8EF0-(E-Mail Removed)...
> Allan,
> thanks for your suggestion. The combo box list appears to be populating
> fine now, but new entry is not selected. I'd like the last Style entry to
> appear selected in the combo box upon re-entry. Is there another simple
> command I can use to make that happen?
>
> thank you very much!
> ElizCat