Unbound Combo Box becomes empty on form.requery?

  • Thread starter Thread starter Jon
  • Start date Start date
J

Jon

Just curious who else has noticed this and hoping that someone has a
suggestion of a elegant way to fix it. The situation is that if I have a
combo box whose row source is bound to a query and the form is bound to a
query, the combo box is blanked out in the sitation where the forms query
has no results. Strangely, if you click in the combo box the value
reappears, but unitl you do the box is blank. I've had this come up before a
remember writing some funky code to get around it, but hope that there's an
easier way, If this description is too confusing let me know and I'll try
to be more clear. I've seen this in 97, 2K and XP and figure it's time to go
ahead and ask and see what the best way to handle it is. Thanks all.


Jon
 
Hi,


Not reproducible here.

I open Northwind. Created a new form based on Invoices. Drag the Ship
Postal Code field to it. Add a combo box to it. Add a command button to it
under which I write the code, for its click event: Me.Requery. I switched
in normal view, entered something in the combobox, clicked the button, the
combo box didn't get cleared.


Is it possible that your code is interacting with your combo box in a
way you forgot? Plain forms don't exhibit the behavior you described... or
I missed something in the setting?



Hoping it may help,
Vanderghast, Access MVP
 
Thanks for taking a look. I was afraid that my posting may not have
completely described the problem. Today I figured out a little bit more
about the problem: It only occurs
when the form is not allowed to create additional records and you can get
around it by explicitly setting the focus back to the combobox though code.
So I guess maybe I'm good now, but its still a little wierd.


Jon
 
Back
Top