VB order

TKnight

Registered User.
Local time
Today, 23:11
Joined
Jan 28, 2003
Messages
181
Hi, I have a form that shows data from 3 different queries using subforms. It takes the DB a few seconds to refresh each query if a user chooses a different filter criteria from the form. What I want to do is make the subforms invisible whilst they are refreshing then make them visible again when they have been refreshed.

I simply used:

Me![subform1].Visible = False
Me![subform2].Visible = False
Me![subform3].Visible = False

Me![subform1].Requery
Me![subform2].Requery
Me![subform3].Requery

Me![subform1].Visible = True
Me![subform2].Visible = True
Me![subform3].Visible = True

but that doesn't work, it seems to perform the requerys first (leaving the subforms visible) even though they're not the initial lines of code. If I take out the .Visible = True parts then it refreshes then makes the subforms invisible???

I tried putting the requery parts in a different sub then calling that sub inbetween the invisible/visible parts but that didn't make a difference. Can anyone tell me why it's doing that? Thanks, Tom.
 
Me![subform1].Visible = False
Me![subform2].Visible = False
Me![subform3].Visible = False
me.repaint
Me![subform1].Requery
Me![subform2].Requery
Me![subform3].Requery

Me![subform1].Visible = True
Me![subform2].Visible = True
Me![subform3].Visible = True

or only the subform......

Regards
 
thanks, schoolboy error!!!
 
It happenes to the mile - erm, best of us :)
 

Users who are viewing this thread

Back
Top Bottom