Combobox slow redraw

M

-Michelle-

Hi
using A2003

I have a combobox whose rowsource is changed depending on the selection from
some option buttons. Upon clicking into the combobox, the combobox drops
down and shows the available companies (nothing new so far).

When a company has been selected, there is short delay before the combobox
is redrawn showing only displaying the selected company. (I hope I
explained this ok)

I have tried using me.repaint ; me.refresh; playing with application.echo
I am running out of ideas, can anyone shed some light on this for me please?

Keeping in mind, it is slower than your normal redraw as I do have code tied
in with the On_Click event which essentially sets the rowsource.

TIA
Michelle

**Please only post replies to newsgroup**
 
K

Ken Snell [MVP]

Am I understanding correctly that you select a company in the combo box, and
then your code changes thr Row Source of that same combo box so that the
dropdown list would contain just that company? If this is correct, why would
you do this? It should be unnecessary.

Could you explain what you're wanting to achieve and perhaps we can suggest
an alternative way to do this.

Or, if I've completely misunderstood your question/setup, please provide
more details.
 
M

-Michelle-

Hi Ken

Sorry, I will provide more info as I understand what you are saying and yes,
I agree, that would be silly to do it that way.

I have 5 option buttons on the Mainform. Combobox is on Mainform and
contains Company Name. Sub form linked (datasheet view). Mainform / Subform
master/child link never changes. Each option button will change the
contents of the combobox (ie: paid / unpaid / etc).

User will more than likely select an option button, execute a print, select
another option button or change their mind before doing anything.

I have not set the rowsource of the combobox until the user actually clicks
into it, otherwise the overhead to keep updating the rowsource before
knowing what the user 'decides' is too much.

When the user clicks into the combobox to select the company after deciding
what option button they want, the combobox drops down to show the selections
(normal behaviour), user selects company (clicks) and then the combobox
redraws to it's normal state showing the company that was selected.

It is during this redraw back to the 'selected' company that is taking about
1 second. It's not the end of the world, but I don't particularly think
it's good and would like to know a way to redraw it faster without that
pause.

Hope that helps.

TIA
Michelle

**Please post replies to newsgroup**
 
K

Ken Snell [MVP]

Ah, that makes more sense. Thanks.

So what you're seeing is a slow response of the combo box to the selection
of the item in the dropdown list, such that the combo box closes the
dropdown list and shows the selection in the combo box. This may be related
to how you're accessing the database. Is the db on your PC? Is it on a
network?
 
M

-Michelle-

FE/BE network



Ken Snell said:
Ah, that makes more sense. Thanks.

So what you're seeing is a slow response of the combo box to the selection
of the item in the dropdown list, such that the combo box closes the
dropdown list and shows the selection in the combo box. This may be related
to how you're accessing the database. Is the db on your PC? Is it on a
network?
 
K

Ken Snell [MVP]

Front end is on your PC?

Any code running on the BeforeUpdate or AfterUpdate events?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top