Solved

label control not appearing

Posted on 1999-01-03
4
144 Views
Last Modified: 2010-05-18
I have a label control on a form with a grid1 control. when someone requests data to fill the grid control I set the label.visible=true, because it says "Please wait" but it dosn't work. The label control is initially set to false then when a person clicks on fillgrid the first command is to make it visible, but it stays invisible. If I F8 and step thru the program, when that command is reached it works perfectly, I have tried placing the label in different places on the form, but to no avail. I also have a check to inform the user that no data is available and if that event is triggered then before the msgbox pops up the label will become visible. This has me stumped, there is no reason why it shouldn't work. I have used this in other programs and it has worked fine the only difference is the grid control.
I am using VB4-16bit.
Any thoughts?
0
Comment
Question by:dtucker
4 Comments
 
LVL 3

Expert Comment

by:a111a111a111
ID: 1453671
one thought without looking at your code:

place exit sub just after you call the lable to be visible.

like this:

lable1.visible = true
exit sub


now you should see the lable visible and continue from there.

you can also email me your code or post it here.

shayplace@hotmail.com
0
 
LVL 2

Expert Comment

by:trillo
ID: 1453672
You're probably executing a lot of code (or time consuming code), and you don't give a chance to the label to paint itself... try something like:

label1.Visible = True
label1.Refresh
. next code statements...

Trillo
0
 

Expert Comment

by:Ajoy
ID: 1453673
dtucker,
as far as my exp with grid, it should cause u no problems.
try what Mr.shayplace has  written and if that works then check ur code for filling the grid.
regards,
ajoy
0
 
LVL 1

Accepted Solution

by:
jeffcameron earned 30 total points
ID: 1453674
use the doevents command, it will allow windows to repaint.

label1.Visible = True
doevents

0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now