By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,407 Members | 1,753 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,407 IT Pros & Developers. It's quick & easy.

? about opening a form while navigating tab control

P: n/a
I''m having problems getting a form to open while going from one tab
to another. I have a tab control: one tab for counties and one tab
for cities. Both tabs have multi-select listboxes. If some, but not
all, counties are chosen, then all cities in the selected counties are
automatically highlighted when the user exits the county tab and goes
to the city tab. So when the user goes to the city tab, they see all
cities in the listbox but only those in the selected counties are
highlighted. This works pretty slick but when the user goes to the
city tab, there is a lag time while the city listbox gets prepared and
this lag time could be mistaken for the database being hung up. I'd
like to display a message talling the user to wait until the city
listbox is populated.

I created a small form that just says "Wait while city list
generates..." and open it when the city listbox is being prepared.
But it doesn't appear to open even though debug confirms that the code
is being run. Here's what I have so far:

DoCmd.OpenForm "frmWait"
<populate city listbox coding>
DoCmd.Close acForm, "frmWait"

This coding is in the exit event of the county listbox. It fires when
the user clicks on the city tab.

Should this form be opened in another event? It didn't make sense to
me to put the "populate city listbox coding" anywhere else but in the
exit event.

Thanks for any help or advice.

Aug 2 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Thu, 02 Aug 2007 06:53:40 -0700, EManning
<ma**********@hotmail.comwrote:

In that form's Form_Load event write:
DoEvents

That will help it get painted.

Personally I would only show an hourglass cursor and leave it at that.
In some cases you can also use the Access status bar to show progress;
check out SysCmd in the help file.

-Tom.

>I''m having problems getting a form to open while going from one tab
to another. I have a tab control: one tab for counties and one tab
for cities. Both tabs have multi-select listboxes. If some, but not
all, counties are chosen, then all cities in the selected counties are
automatically highlighted when the user exits the county tab and goes
to the city tab. So when the user goes to the city tab, they see all
cities in the listbox but only those in the selected counties are
highlighted. This works pretty slick but when the user goes to the
city tab, there is a lag time while the city listbox gets prepared and
this lag time could be mistaken for the database being hung up. I'd
like to display a message talling the user to wait until the city
listbox is populated.

I created a small form that just says "Wait while city list
generates..." and open it when the city listbox is being prepared.
But it doesn't appear to open even though debug confirms that the code
is being run. Here's what I have so far:

DoCmd.OpenForm "frmWait"
<populate city listbox coding>
DoCmd.Close acForm, "frmWait"

This coding is in the exit event of the county listbox. It fires when
the user clicks on the city tab.

Should this form be opened in another event? It didn't make sense to
me to put the "populate city listbox coding" anywhere else but in the
exit event.

Thanks for any help or advice.
Aug 2 '07 #2

P: n/a
On Aug 2, 7:19 am, Tom van Stiphout <no.spam.tom7...@cox.netwrote:
On Thu, 02 Aug 2007 06:53:40 -0700, EManning

<manning_n...@hotmail.comwrote:

In that form's Form_Load event write:
DoEvents

That will help it get painted.

Personally I would only show an hourglass cursor and leave it at that.
In some cases you can also use the Access status bar to show progress;
check out SysCmd in the help file.

-Tom.
I''m having problems getting a form to open while going from one tab
to another. I have a tab control: one tab for counties and one tab
for cities. Both tabs have multi-select listboxes. If some, but not
all, counties are chosen, then all cities in the selected counties are
automatically highlighted when the user exits the county tab and goes
to the city tab. So when the user goes to the city tab, they see all
cities in the listbox but only those in the selected counties are
highlighted. This works pretty slick but when the user goes to the
city tab, there is a lag time while the city listbox gets prepared and
this lag time could be mistaken for the database being hung up. I'd
like to display a message talling the user to wait until the city
listbox is populated.
I created a small form that just says "Wait while city list
generates..." and open it when the city listbox is being prepared.
But it doesn't appear to open even though debug confirms that the code
is being run. Here's what I have so far:
DoCmd.OpenForm "frmWait"
<populate city listbox coding>
DoCmd.Close acForm, "frmWait"
This coding is in the exit event of the county listbox. It fires when
the user clicks on the city tab.
Should this form be opened in another event? It didn't make sense to
me to put the "populate city listbox coding" anywhere else but in the
exit event.
Thanks for any help or advice.- Hide quoted text -

- Show quoted text -
Is it possible the form is opening, but is behind another window?

Just a thought...

Aug 2 '07 #3

P: n/a
On Aug 2, 11:39 am, Jana <Bauer.J...@gmail.comwrote:
On Aug 2, 7:19 am, Tom van Stiphout <no.spam.tom7...@cox.netwrote:


On Thu, 02 Aug 2007 06:53:40 -0700, EManning
<manning_n...@hotmail.comwrote:
In that form's Form_Load event write:
DoEvents
That will help it get painted.
Personally I would only show an hourglass cursor and leave it at that.
In some cases you can also use the Access status bar to show progress;
check out SysCmd in the help file.
-Tom.
>I''m having problems getting a form to open while going from one tab
>to another. I have a tab control: one tab for counties and one tab
>for cities. Both tabs have multi-select listboxes. If some, but not
>all, counties are chosen, then all cities in the selected counties are
>automatically highlighted when the user exits the county tab and goes
>to the city tab. So when the user goes to the city tab, they see all
>cities in the listbox but only those in the selected counties are
>highlighted. This works pretty slick but when the user goes to the
>city tab, there is a lag time while the city listbox gets prepared and
>this lag time could be mistaken for the database being hung up. I'd
>like to display a message talling the user to wait until the city
>listbox is populated.
>I created a small form that just says "Wait while city list
>generates..." and open it when the city listbox is being prepared.
>But it doesn't appear to open even though debug confirms that the code
>is being run. Here's what I have so far:
DoCmd.OpenForm "frmWait"
<populate city listbox coding>
DoCmd.Close acForm, "frmWait"
>This coding is in the exit event of the county listbox. It fires when
>the user clicks on the city tab.
>Should this form be opened in another event? It didn't make sense to
>me to put the "populate city listbox coding" anywhere else but in the
>exit event.
>Thanks for any help or advice.- Hide quoted text -
- Show quoted text -

Is it possible the form is opening, but is behind another window?

Just a thought...- Hide quoted text -

- Show quoted text -
I thought that might be the case too. But I don't think so. I'm
going to use Tom's suggestion of the hourglass.

Thanks for your help, Tom and Jana.

Aug 3 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.