Re: Requerying ComboBox in NotInList event
- From: EManning <manning_news@xxxxxxxxxxx>
- Date: Wed, 5 Mar 2008 11:32:01 -0800 (PST)
On Mar 5, 8:57 am, Guillermo_Lopez <g.lo...@xxxxxxxxx> wrote:
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 -- Hide quoted text -
- Show quoted text -
Any attempt to requery the combobox gives me an error that the field
must be saved, whether or not the "Me." is used. The form is unbound
so requerying it wouldn't do any good. Thanks for replying.
.
- Follow-Ups:
- Re: Requerying ComboBox in NotInList event
- From: Salad
- Re: Requerying ComboBox in NotInList event
- References:
- Requerying ComboBox in NotInList event
- From: EManning
- Re: Requerying ComboBox in NotInList event
- From: Tom van Stiphout
- Re: Requerying ComboBox in NotInList event
- From: Guillermo_Lopez
- Requerying ComboBox in NotInList event
- Prev by Date: Re: UnBound Combo Box Behaviour
- Next by Date: populating an unbound field in a continuous record form
- Previous by thread: Re: Requerying ComboBox in NotInList event
- Next by thread: Re: Requerying ComboBox in NotInList event
- Index(es):
Relevant Pages
|