Form not showing

I

Infocore

I have a button on a form, that when clicked, runs a query that takes
a long time. I wanted to pop up another form that would tell the user
the query takes a long time and displays the start time of running the
procedure.

I built a small form for this and put it in my vba code. So now my
VBA says

....
DoCmd.OpenForm "frmMsg", acNormal
DoCmd.OpenQuery "LongQuery"

The problem I have is that the frmMsg doesn't fully open. It seems to
start to open it and then doesn't display it on screen to me until
after LongQuery finishes.

I tried taking the
DoCmd.OpenQuery "LongQuery" line out and put it in the OnOpen event of
frmMsg, but that didn't seem to help.

Any ideas?
 
L

Leslie Isaacs

I'm no expert (I usually ask questions on these groups, not answer them!),
but how about moving the button that runs the query onto your frmMsg? That
way the user will definitely have had the opportunity of reading the warning
message before "LongQuery" is started.

HTH
Leslie Isaacs NVA
(Nonvalued amateur)
 
T

Tom Wickerath

Hi VVM (Very Valued Member!) Leslie,

Your suggestion certainly sounds reasonable to me.

Infocore:
You might want to investigate the possibility of speeding up your query, so
that you can possibly change a query that takes a long time to run into a
snappy query that delights your users. Have a look at my MultiUser
Applications paper. This includes many ideas, such as establishing a
persistent connection (for an application that has been split into a FE
[Front-End] and a BE [Back-End]), using proper indexes, and using the
JETShowPlan functionality to see if you are producing full table scans that
many not be needed. Also, have you compacted the database lately?

Implementing a Successful Multiuser Access/JET Application
http://www.accessmvp.com/TWickerath/articles/multiuser.htm


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
__________________________________________

:

I'm no expert (I usually ask questions on these groups, not answer them!),
but how about moving the button that runs the query onto your frmMsg? That
way the user will definitely have had the opportunity of reading the warning
message before "LongQuery" is started.

HTH
Leslie Isaacs NVA
(Nonvalued amateur)
__________________________________________
"Infocore" wrote in message

I have a button on a form, that when clicked, runs a query that takes
a long time. I wanted to pop up another form that would tell the user
the query takes a long time and displays the start time of running the
procedure.

I built a small form for this and put it in my vba code. So now my
VBA says

.....
DoCmd.OpenForm "frmMsg", acNormal
DoCmd.OpenQuery "LongQuery"

The problem I have is that the frmMsg doesn't fully open. It seems to
start to open it and then doesn't display it on screen to me until
after LongQuery finishes.

I tried taking the
DoCmd.OpenQuery "LongQuery" line out and put it in the OnOpen event of
frmMsg, but that didn't seem to help.

Any ideas?
 
J

John W. Vinson

I built a small form for this and put it in my vba code. So now my
VBA says

...
DoCmd.OpenForm "frmMsg", acNormal
DoCmd.OpenQuery "LongQuery"

The problem I have is that the frmMsg doesn't fully open. It seems to
start to open it and then doesn't display it on screen to me until
after LongQuery finishes.

If Leslie's good suggestion doesn't work, I'd try reversing the order - start
the query and THEN open the form, in dialog mode. The query will keep running
in the background since it's already started.
 

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

Similar Threads


Top