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 » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

.VISIBLE Not Working Perfectly



 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old March 18th, 2010, 05:47 AM posted to microsoft.public.access
Faraz Ahmed Qureshi[_2_]
external usenet poster
 
Posts: 40
Default .VISIBLE Not Working Perfectly

I want a few controls/text boxes to be visible only if the text box LOCATION
consists the entry Branch. Following piece of code results into be working
upon only upon the first record. In other words, once the controls become
visible they don't hide upon the next Non-Branch record unless I move the
scroll bars.

What might be the reason???

Every time I need to move within the new/current record by moving the scroll
bars to have the boxes be visible/not depending upon the LOCATION.

Private Sub Form_current()
If Me.Location "Branch" Then
Me.Br_T24_Code.Visible = False
Me.Branch_Name.Visible = False
Me.Address.Visible = False
Me.City.Visible = False
Me.Region.Visible = False
Me.Phone1.Visible = False
Me.Phone2.Visible = False
Me.Phone3.Visible = False
Me.Br_status.Visible = False
Me.Br_T24_Code.Enabled = False
Me.Branch_Name.Enabled = False
Me.Address.Enabled = False
Me.City.Enabled = False
Me.Region.Enabled = False
Me.Phone1.Enabled = False
Me.Phone2.Enabled = False
Me.Phone3.Enabled = False
Me.Br_status.Enabled = False
Else
Me.Br_T24_Code.Visible = True
Me.Branch_Name.Visible = True
Me.Address.Visible = True
Me.City.Visible = True
Me.Region.Visible = True
Me.Phone1.Visible = True
Me.Phone2.Visible = True
Me.Phone3.Visible = True
Me.Br_status.Visible = True
Me.Br_T24_Code.Enabled = True
Me.Branch_Name.Enabled = True
Me.Address.Enabled = True
Me.City.Enabled = True
Me.Region.Enabled = True
Me.Phone1.Enabled = True
Me.Phone2.Enabled = True
Me.Phone3.Enabled = True
Me.Br_status.Enabled = True
End If
Me.Recalc
End Sub

--
Thanx & Best Regards,

Faraz!
 




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


All times are GMT +1. The time now is 02:34 AM.


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