Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text Box Still Visible 1

Status
Not open for further replies.

carlp69

IS-IT--Management
Sep 23, 2003
157
GB
I have a block of text fields on a form that are hidden by a box (box56) using the Box56.BackStyle = 1 (normal) until such time that they are required to be seen - using Box56.BackStyle = 1 (Transparent).

This works great for the text boxes already on the form, but after adding an additional text field, box56 does not blank out the new field.

My initial thoughts where something like the tab index, but this is not the case.

Any ideas?
 
right-click on the box and choose bring to front from the shortcut menu.
There are different ways to hide textboxes

________________________________________________________
Zameer Abdulla
Help to find Missing people
Seek counsel of him who makes you weep, and not of him who makes you laugh.
 
Their is no 'Bring to front' when right clicking the box!
 
Oh sorry.. Format menu form the menu bar

________________________________________________________
Zameer Abdulla
Help to find Missing people
Seek counsel of him who makes you weep, and not of him who makes you laugh.
 
Thanks I already found it on the Format Menu.

 

I think Zameer was refering to the Visible property on the Format tab for those text boxes! And there is a trik (one of those things I ve learned here) that you can use to toggle visibilty

Text1.Visible = Not Text1.Visible
 
Jerry,
callp69 is hiding a group of textboxes by setting the box transparent. But I don't prefer this.. I will go with the Tag Property of the controls.
Code:
Dim CTL As Control
For Each CTL In Me.Controls
If CTL.Tag = "TagID" Then
 .................

________________________________________________________
Zameer Abdulla
Help to find Missing people
Seek counsel of him who makes you weep, and not of him who makes you laugh.
 
why dont you try this it simple takes a bit of typing though

your code <----->
when you want to say box 1 - 20 to disapear try this
box1.visable = false
box2.visable = false
box3.visable = false...
box20.visable = false

or you could group the txt boxes by simple making thefirst one and copying it. this would give the txt box a name like txtbox(0) and the next one will be txtbox(1)like a procedure name the number in the () can be a variable this mean you could write a procedure to hide text box 1 - 20 summthing like this

(tech people correct me if im wrong)
private sub invis()
Dim i as integer
for i = 1 to 20
txtbox(i).visable = false
next i
end sub

and then you can make them visable again simply by reversing it changing the bits in red.

private sub vis() 'change the name of procedure
Dim i as integer
for i = 1 to 20
txtbox(i).visable = false 'change it to visable
next i
end sub

This is my first attempt at helping some one so dont try this untill some one with a greater knoledge to me says it wil work (gotta start someware)
 
Oderbang,
1)In VB6 you can do that not in Access. MS Access doesn't support control arrays. for more info on this see RoyVidar's FAQ
Form - looping thru the controls faq702-5010
2) A typo indeed but to notify you

[tt]box1.visable = false

box1.visible = false[/tt]


________________________________________________________
Zameer Abdulla
Help to find Missing people
All cats love fish but fear to wet their paws..
 
oh well i tried ..maybe microsoft should incorprate that into there next package of VBA oh well sorry

as for my typo ...im useless at english
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top