Making texboxes invisible depending on the value in them

How do you make a textbox invisible depending on the value within then. I have a continous form which shows a textbox for tool numbers. However, when the tool number is "UNKNOWN" how do I make it that it substitutes in the Serial number of the Tool in its place?

Sponsored Links:

Related Topics

Making a Command Buttong Visible/Invisible
I am working on a database in which I am trying to write some code which displays a command button dependant on another action.

In my example, I have two check boxes which I have set up to allow only one choice. So when you check one, the other becomes unchecked!

Behind both these check boxes I have managed to write the code which does make the command button visible/invisible depending on which check box is checked. See bellow


However, the crucial bit I am missing is that it does the same response for ever record. So if I want it invisible in one record that's fine,but then if you go to the next record where you want it to be visible, and have checked the correct box for this to happen, it is still invisible. What I need is some additional coding which ties it to the current record?

Making Form Buttons Visible/Invisible Depending On the Contents Of a Field
I am trying to make a button on a form visible and invisible dependant on the contents of a field in my form,

Make subform control invisible depending on value in mainform.
I want to make a control on a subform invisible depending on the value that's in one of the boxes on a mainform.

I had this behind the on change event of the mainform. Doesn't work though.

Make Text Box Invisible
I am trying to get a report to make either one of two text boxes invisible depending on the users input.

So if txt15 is blank then visible = FALSE this should then reveal txt18 which should then have data in.

I have looked through the forum and found something similar to the following.

Private Sub FormHeader_Format(Cancel As Integer, FormatCount As Integer)

Me.Txt15.Visible = Not IsNull(Me.Txt15)
Me.Txt18.Visible = Not IsNull(Me.Txt18)

It works to a degree, but if txt15 is Blank it does not make the textbox invisible thus will not display Txt

Multiple fields set to visible or invisible based on field content
I got lots and lots of fields need to be set to visible or invisible based on field content. Manually coding of this is possible it just takes forever. This is what I am wondering (ifthis is possible or exists or not):

If I had say 10 fields all all those 10 fields were to be set to invisible or visible depending on a single check mark box, could I say 'draw' something maybe a special 'frame' around those10 fields so that I can refer to the 'frame' and everything in that area could be invisible or visible based upon the check mark box versus having to code 10 fields individually?

Making text field visable/invisable on a check box
I want to make a field invisible if a check box is ticked, but return it to being visible if the check box becomes unticked. I can easily make it invisible, but I am struggling with the return process.

to turn invisible use coding:
Me.Home_Goals.Visible = Nz(Me.Home_Walkover, "") = "Inactive

Setting fields visible/invisible
I have created a form that contains a combo box with 4 choices. I also have 3 fields which I have set to be invisible. What I want to be able to do is depending on the choice made in the combo box determines which field becomes visible.

I'm not sure what I'm doing wrong. I'm pretty new to VBA but am quite good with macros and still can't make it work. I have tried setting my field [via] event as got focus, lost focus and change. I can get it to work if I choose the first choice the relevant field becomes visible but if I choose anything else the relevant fields do not become visible and the first field won't go invisible.

How to Lock Texboxes based on another Textbox value in a form
In the form all texboxes(values) are populated based on the selection of a value from a combo box.Say for example, the combo box has values from 1 to 100 & there are few Textboxes txt1,txt2,txt3,txt4,txt5. The possible values for txt1 are X1,X2,Y1&Y2. i.e., whatever we select from a combo, txt1 value should be from one of those four values. Now my question is, how to lock other textboxes txt2,txt3,txt4 if txt1 value is either X1/X2 else unlock

Fields in form conditinional visible / invisible or hide
Access friends

I have a question about conditional formating of fields.
I have a form with 18 fields which must be visible or invisible depending on the value of a combobox "code"

Lets say
record 1 code A1-3 Visible 1,2,3,4,5,6 hide the rest
record 2 code A1-1 visible 1,2,8,9 hide the rest
recode 3 code A2-10 visible 5,6,7,8,9 hide the rest

sample is enclosed

Uploading a table
Some information in our customer accounts has become uninterpretable due to merging from another software and shows as squares amongst the text. When I export this data into an excel list, these signs are invisible but exist in form of a line break (wrapped cell). I format the cells as unwrapped and upload into access but it corrupts. Where those invisible signs are, it gets treated like comma seperated and the content breaks into the next column. I can't find/replace those signs in excel as they are invisible there, so there must be a way of formatting while uploading into access that they get ignored

Is there a group control for all other controls in Access?
I have to make a group of controls including text box, labels to visible/invisible depending on the value of a combox.

Can I group them or I have to write code for each of the controls?

Setting labels to invisible if report is only 1 page long
I have a report in which I want a label to appear only on pages 2 though n, and to be invisible on page 1.

I'm not sure what the code syntax is for describing pages in a report on VB.

Invisible field in a report
In a report on a certain condition I want the field to be invisible
and the code is :
If Me.Field1 = 1 then
Me.Field2.Visible = False
End if
But the problem is that when I type Me.Field2.
the word Visible doesn't appear on the list

Invisible field on a report
In a report on a certain condition I want the field to be invisible
and the code is :
If Me.Field1 = 1 then
Me.Field2.Visible = False
End if
But the problem is that when I type Me.Field2.
the word Visible doesn't appear on the list

Hide textboxes only on new record.
I'm trying to hide textboxes but only on the New Record that the form loads up on. i.e. when I go back to a previous record using the navigation buttons on the form footer the boxes should be set to visible. Below is what Ive tried but is not working, it keeps the boxes invisible all the time.

Set boxes invisible on load

Private Sub Form_Load()
'Open the form at a new Record.
DoCmd.GoToRecord , , acNewRec
'Set Later steps to invisible on load
If Me.NewRecord = True Then
Text20.Visible = False
Text67.Visible = False
Text71.Visible = False
Command1.Visible = False
Command105.Visible = False
End If End Sub

Navigate to another set to visible

Private Sub Form_GotFocus()
If Me.NewRecord = False Then
Text20.Visible = True
Text67.Visible = True
Text71.Visible = True
Command1.Visible = True
Command105.Visible = True
End If End Sub

I'm sure this can't be as difficult as Im making

unhide controls
I'm new in this forume and maybe I'm making thing wrongly.
My problem is this.
I would like to post an hiden or invisible controle in a form , but I would like to unhide ore make Visible this control, if I check a box or beter if I put a certain value (e.g. Yes) in another control

Is this access 2007 database secure?
I have the back end password protected and added some security measures to the front end.

I have the F11 and **** keys disabled on startup. Full menus are not allowed and I have a custom ribbon with no functionality (which is disabled upon start up for redundancy) and a custom global shortcut menu with just copy, paste, delete. No navigation menu is available nor are any special keys usable

The shift key can be enabled by going to a password protected admin menu and double clicking a certain invisible area which brings up an invisible textbox somewhere where another (different) password is required to make an invisible button functional and visible (funny, I know).

I also have it saved as ACCDE so forms/vba can't be imported (or can they, somehow)?

What else can I do

How to change the height of the 'detail' part of a form?
I know how to set this Property, but what I'm really asking is how I can set it to something smaller than it wants to be.

On a continuous subform, I have a set of fields (all at the bottom of the Detail section) that normally I want to be invisible. On the click of a button, I want to set all their Visible properties to True.

So when the fields are invisible, I'd like to set the height of the Detail section to exclude the "real estate" reserved for the invisible fields, and then, on the click of the button,reset the height at the same time that I set the visibility properties.

Exporting invisible fields on a form to Excel
I'm using Access 2010 and I have a form that will be used to select or filter records which will then be exported to Excel. However, I only want to show the critical fields that will be used to make the decision on which records to export on the form but export a far larger set of fields.

The data set of the form is actually a query that contains all the fields required for the export.

If I place all the fields on the (continuous) form but make the ones the user doesn't need to see invisible they are not exported using the standard external data->export/Excel. I can think of a couple of ways round this like making all the fields visible but transparent/white font etc or placing a button on the form and generating the export by dynamically creatinga query based on any filtering the user may have chosen.

However, I was wondering if there is a tidier way to achieve the export of the required fields?

trying to add color to texboxes
On my forms, I want to have the background color on a textbox change when it is selected, then go back to default when you tab to the next textbox. Is there some generic code that will do this? I have up to 20 txtboxes per tab, and dont want to have to add code specifically for each box.