Re: NotinList Event
- From: "Joshua A. Booker" <josh@xxxxxxxxxxxxxxxxx>
- Date: Tue, 4 Apr 2006 12:40:39 -0400
Sailormike,
Open the form using the acdialog mode like in this code. This will make the
code wait until the user closes the form to continue. You can also pass the
combo entry using the openargs.
Private Sub Combo_NotInList(NewData As String, Response As Integer)
If vbYes = MsgBox("Not In List." & vbCrLf & "Add To List?", vbYesNo +
vbQuestion, "Not In List") Then
DoCmd.OpenForm "puf_AddRecord", , , , , acDialog, NewData
Response = acDataErrAdded
Else
Response = acDataErrContinue
End If
End Sub
Then, in the form that opens, you can set the value to the openargs value
like this:
Private Sub Form_Open(Cancel As Integer)
If Not 0 = len(Me.OpenArgs) then
Me!Combo = Me.OpenArgs
End If
End Sub
HTH,
Josh
"Sailormike" <Sailormike@xxxxxxx> wrote in message
news:EE47A2EF-4436-44EF-BAF7-DAA6DF106FC2@xxxxxxxxxxxxxxxx
This has got to be a very common problem but i have not found an answera
anywhere?!
When this event occurs I want to pop up a form that allows the user to add
record to the table. But a new record requires data in 3 fields not justthe
one in the combo box. I have a form that does this but the NotInList event
does not allow just opening a form.
How do i get this event to just open the form?
--
SailorMike
.
- Follow-Ups:
- Re: NotinList Event
- From: Sailormike
- Re: NotinList Event
- Prev by Date: Re: NotinList Event
- Next by Date: Re: Before Update Code error
- Previous by thread: Re: NotinList Event
- Next by thread: Re: NotinList Event
- Index(es):
Relevant Pages
|