Re: Combo Box dilema
From: Patti (anonymous_at_discussions.microsoft.com)
Date: 09/14/04
- Next message: Bruce: "Re: Bring form to front"
- Previous message: Allen Browne: "Re: Taking user confirmation to save changes before update"
- In reply to: Allen Browne: "Re: Combo Box dilema"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 14 Sep 2004 08:29:50 -0700
Thanks, Allen. I forgot about error handling code. I
took a VB course about a year-and-a half ago but don't
use it a lot. I'll give that a try. THANKS!
patti
>-----Original Message-----
>You could use error handling in the procedure to just
ignore that error.
>
>If you are not sure how to set up error handling, see:
> http://members.iinet.net.au/~allenbrowne/ser-23a.html
>
>--
>Allen Browne - Microsoft MVP. Perth, Western Australia.
>Tips for Access users - http://allenbrowne.com/tips.html
>Reply to group, rather than allenbrowne at mvps dot org.
>
>"Patti" <anonymous@discussions.microsoft.com> wrote in
message
>news:218701c49a6b$60b3f0c0$a401280a@phx.gbl...
>> The NotInList event works fine when I want to add a new
>> company. the only time I get the runtime error is
when I
>> answer "No" in response to "... Do you want to add it?"
>> MsgBox. (in the example of a typo error). My code is
>> listed below. When I debug the code, the line "Me!
>> cboCompany = Null" is the one that is highlighted.
>>
>> Private Sub cboCompany_NotInList(NewData As String,
>> Response As Integer)
>>
>> If MsgBox("This item is not in the list. Do you want to
>> add it?", _
>> vbDefaultButton1 + vbYesNo) = vbYes Then
>> DoCmd.OpenForm "frmAddCompany", , , , acFormAdd,
>> acDialog
>> Response = acDataErrAdded
>>
>> Else
>> Response = acDataErrContinue
>> Me!cboCompany = Null
>> Me!cboCompany.Dropdown
>> End If
>>
>> End Sub
>
>
>.
>
- Next message: Bruce: "Re: Bring form to front"
- Previous message: Allen Browne: "Re: Taking user confirmation to save changes before update"
- In reply to: Allen Browne: "Re: Combo Box dilema"
- Messages sorted by: [ date ] [ thread ]