Re: Requerying ComboBox in NotInList event
- From: Guillermo_Lopez <g.lopez@xxxxxxxxx>
- Date: Wed, 5 Mar 2008 06:57:38 -0800 (PST)
The way it works for me is typing:
ComboBox.Requery
I don't use the me. part because im running the code in the form
already.
Instead of using the requery on the combo box, try requerying the
From.
CurrentForm.Requery
- GL
On Mar 5, 1:37 am, Tom van Stiphout <no.spam.tom7...@xxxxxxx> wrote:
On Tue, 4 Mar 2008 11:09:22 -0800 (PST), EManning
<manning_n...@xxxxxxxxxxx> wrote:
Your code, minus the Requery, looks correct. Perhaps you have On Error
Resume Next and you are suppressing errors?
-Tom.
I have a combobox whose rowsource is a union query. This query
displays a person's name in "lastname, firstname" format and in
"firstname lastname" format. The query results look like this:
Mouse, Mickey
Mickey Mouse
When a person is added, the querys' underlying recordset is updated in
the NotInList event. I can't figure out how to refresh the combobox
to display the new person. I get the standard error message that the
item is not in the list. Here's my code:
...<in the NotInList event>...
With rst
.AddNew
!FirstName = strFirstName
!MiddleInitial = strMiddleInitial
!LastName = strLastName
.Update
End With
Response = acDataErrAdded
I have to refresh the query somehow so that it displays in the combo
box. If I add the code:
Me.ComboBox.Requery
I get the standard error message that it must be saved.
Maybe there's a better way to do this? Thanks for any help or advice.- Hide quoted text -
- Show quoted text -
.
- Follow-Ups:
- Re: Requerying ComboBox in NotInList event
- From: EManning
- Re: Requerying ComboBox in NotInList event
- References:
- Requerying ComboBox in NotInList event
- From: EManning
- Re: Requerying ComboBox in NotInList event
- From: Tom van Stiphout
- Requerying ComboBox in NotInList event
- Prev by Date: Re: Is FormHeader Active ?
- Next by Date: UnBound Combo Box Behaviour
- Previous by thread: Re: Requerying ComboBox in NotInList event
- Next by thread: Re: Requerying ComboBox in NotInList event
- Index(es):
Relevant Pages
|