Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

label control not appearing

Posted on 1999-01-03
4
Medium Priority
?
149 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 120 total points
ID: 1453674
use the doevents command, it will allow windows to repaint.

label1.Visible = True
doevents

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

885 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