A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

.visible = true not working



 
 
Thread Tools Display Modes
  #1  
Old April 20th, 2005, 07:02 PM
tw
external usenet poster
 
Posts: n/a
Default .visible = true not working

I have code in a timer event that is very simple. It is just supposed to
show a label on a form. The label's property sheet has visible = false
TimerInterval property is set to 1000 on form_load() event.

The following code works when I step through it, but when I just run the
form it doesn't work.

Private Sub Form_timer()
On Error Resume Next
Dim strMsg As String
Dim strPath As String
Dim strUpdateTool As String
Const q As String * 1 = """"

'if versions match, then proceed with opening of main form.
If strVerClient = strVerServer Then
Me.lblLoadingMenu.Visible = True
DoCmd.OpenForm "frmSwitchboardLoader"
else
.....snip

This form is a splash screen that shows the current version number. It also
checks the version number on the server to make sure they are in sync. If
not it will run code to update the version running. I have taken this code
from an article I found by Danny Lesandrini. I'm making some modifications
to the code, and this is one of them.

My form frmSwitchboardLoader basically creates the Switchboard Items table
on the fly based on user permissions. The label I want to show is a simple
message to let the user know the menu options are being loaded.

When I put in a breakpoint and step through the code
me.lblLoadingMenu.Visible = true actually causes the label to be visible.
When I run the code without a break I never see the label. In either case
the form frmSwitchboardLoader work fine. The form frmSplash (this form)
stays on the screen long enough that I should see the message. What am I
doing wrong? Even if I put a timer pause between the label visible and the
form load I still don't see the label when running the code without a
breakpoint.




  #2  
Old April 20th, 2005, 07:07 PM
Brendan Reynolds
external usenet poster
 
Posts: n/a
Default

Try ...

Me.Repaint

.... after the line that changes the .Visible property, and before the line
that opens the other form. If that doesn't work on its own, try adding ...

DoEvents

.... after the Me.Repaint line.

--
Brendan Reynolds (MVP)

"tw" wrote in message
...
I have code in a timer event that is very simple. It is just supposed to
show a label on a form. The label's property sheet has visible = false
TimerInterval property is set to 1000 on form_load() event.

The following code works when I step through it, but when I just run the
form it doesn't work.

Private Sub Form_timer()
On Error Resume Next
Dim strMsg As String
Dim strPath As String
Dim strUpdateTool As String
Const q As String * 1 = """"

'if versions match, then proceed with opening of main form.
If strVerClient = strVerServer Then
Me.lblLoadingMenu.Visible = True
DoCmd.OpenForm "frmSwitchboardLoader"
else
....snip

This form is a splash screen that shows the current version number. It
also checks the version number on the server to make sure they are in
sync. If not it will run code to update the version running. I have
taken this code from an article I found by Danny Lesandrini. I'm making
some modifications to the code, and this is one of them.

My form frmSwitchboardLoader basically creates the Switchboard Items table
on the fly based on user permissions. The label I want to show is a
simple message to let the user know the menu options are being loaded.

When I put in a breakpoint and step through the code
me.lblLoadingMenu.Visible = true actually causes the label to be visible.
When I run the code without a break I never see the label. In either case
the form frmSwitchboardLoader work fine. The form frmSplash (this form)
stays on the screen long enough that I should see the message. What am I
doing wrong? Even if I put a timer pause between the label visible and
the form load I still don't see the label when running the code without a
breakpoint.






  #3  
Old April 20th, 2005, 07:19 PM
tw
external usenet poster
 
Posts: n/a
Default

me.repaint worked w/o DoEvents
Thanks

"Brendan Reynolds" anonymous at discussions dot microsoft dot com wrote in
message ...
Try ...

Me.Repaint

... after the line that changes the .Visible property, and before the line
that opens the other form. If that doesn't work on its own, try adding ...

DoEvents

... after the Me.Repaint line.

--
Brendan Reynolds (MVP)

"tw" wrote in message
...
I have code in a timer event that is very simple. It is just supposed to
show a label on a form. The label's property sheet has visible = false
TimerInterval property is set to 1000 on form_load() event.

The following code works when I step through it, but when I just run the
form it doesn't work.

Private Sub Form_timer()
On Error Resume Next
Dim strMsg As String
Dim strPath As String
Dim strUpdateTool As String
Const q As String * 1 = """"

'if versions match, then proceed with opening of main form.
If strVerClient = strVerServer Then
Me.lblLoadingMenu.Visible = True
DoCmd.OpenForm "frmSwitchboardLoader"
else
....snip

This form is a splash screen that shows the current version number. It
also checks the version number on the server to make sure they are in
sync. If not it will run code to update the version running. I have
taken this code from an article I found by Danny Lesandrini. I'm making
some modifications to the code, and this is one of them.

My form frmSwitchboardLoader basically creates the Switchboard Items
table on the fly based on user permissions. The label I want to show is
a simple message to let the user know the menu options are being loaded.

When I put in a breakpoint and step through the code
me.lblLoadingMenu.Visible = true actually causes the label to be visible.
When I run the code without a break I never see the label. In either
case the form frmSwitchboardLoader work fine. The form frmSplash (this
form) stays on the screen long enough that I should see the message.
What am I doing wrong? Even if I put a timer pause between the label
visible and the form load I still don't see the label when running the
code without a breakpoint.








 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo box locked? Sam Kuo Using Forms 16 April 2nd, 2005 07:47 AM
compile error Walter Using Forms 4 March 14th, 2005 08:56 AM
Search button stop working Bessie Using Forms 1 January 29th, 2005 01:49 PM
my search button stop working Bessie General Discussion 0 January 25th, 2005 05:47 PM
"AND" (compound conditions) Monika Krug Mailmerge 10 November 9th, 2004 02:06 PM


All times are GMT +1. The time now is 01:36 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.