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?

Sponsored Links:

Related Topics

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 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.

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

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

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

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 LookUp Data List
I have created a simple table, two fields, an Autonumber Primary Key, Field Name - lngBureauID and a Text Field, strBureauName. In a few other tables I have called this table data using the LookUp Data Type. No big deal! However, when I drop down the list of Bureaus the Bureau Name is invisible. If you select something from the list the data is then visible in the table however you don't ever know wht you are selecting because you can't see it. When I make the Primary Key visible, it is visible but the text string field is not. What would cause a fields data to be invisible? I hope you can help me because I can't ask users to select data from a list when they can't see the data. I have looked everywhere for a format or system property that may be causing this issue, I am stumped. I have even created the table again, and ended up with the same problem. I have even created a new database and table and ended up with the same problem

Make fields visible onclick() button
I have a form which has 4 fields for inputting items directly into a table. I also have a button called Command122 which I want users to be able to click to display 4 more (invisible) input fields.
When I click the button, I get the error "Method or Data Not Found". Could someone help me with my code?

Private Sub Command122_Click()
Me.Label18.Visible = True
Me.Label19.Visible = True
Me.Label20.Visible = True
Me.Label21.Visible = True
Me.object5.Visible = True
Me.object6.Visible = True
Me.object7.Visible = True
Me.object8.Visible = True
End Sub

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 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

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?

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,

How to set page header to invisible using vba
What I need is to set invisible the page header in the first page.
I'm using the following code, I succeed what I want in screen but when I print I get the page header in all pages.

If Me.Page > 0 Then Me.PageHeaderSection.Visible = True Else Me.PageHeaderSection.Visible = False End If

Can't Hide Control that has the focus
I have a set of controls that are made visible upon clicking a button. When a subsequent button is pressed, these controls are made invisible again. This is what I am using right now.

Private Sub cmdUpdateProfile_Click()
tboname.visible = false
tbophone.visible = false
tboPassword.visible = false
tboautologin.visible = false
cmdUpdateProfile.visible = false
End Sub

All of these go invisible, but when I try to set the visibility of the cmdUpdateProfile to False, I get the "You can't hide control that has the focus" error message. I don't understand this, because it no longer has focus.

Note that the cmdUpdateProfile is the button I am clicking as well as the button I am trying to hide.this may be the issue.

About records and making field visible
I actually have 3 questions that I am hoping someone can help me with.

1. On a form I want fields to be invisible until one field meets its requirements and then the rest become visible. I have the following code in but its not working.

Private Sub Act1Cal_AfterUpdate()
Me.CalisthenicsDone.Visible = False
If Me.Act1Cal = "Calisthenics" Then
Me.CalisthenicsDone.Visible = True

End If
End Sub

2. I want to know if it is possible to have a table to only allow 10 records? If it is possible how to I do that.

3. I have been playing with the database I am creating and as I work with it I am creating records that have an autonumber. Is there away to reset the autonumber back to

Hide Part of Report Based on Field Value
Visible status of an object in a Report based on the value of one of the fields in the record?

I have a report called rptDrillDown which gives the details of a record after being called by an On Click event from the summary report. So far, It's calling up just fine. However, each record has a check box indicating whether the study has to be implemented.

When the box is checked, a whole bunch of fields show up with dates to track the implementation. When the boxis unchecked, the fields are invisible.

This works great on my data entry form, but not so much for my report. not so much.

Make Access Report Column Visible/Invisible based on Condition
Wondering if there's a way to make an access report column visible or invisible based on a condition?

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

Make a field visible based on the combo box selection
I am using MS Access 2010. I have a field that is invisible. I want to make it visible based on the selection from a combo box. There are more than one possible selections that would make this visible. Here is the breakdown.

I have an inventory form that lists the cost and retail price of an item When I select the "Location" of the item (where it is being sold, ie: Betty's Bargain Barn) I want a heading that says Consignment to appear as well as the Price.

There are other locations that can make this consignment heading and price field appear, so it would need to have more than one "IF" in it. I tried to create the code but it won't show up.

Field Visible If other fields are null
I have a row of fields (call them 1-4) set up and have a field (with label) below (5) it that is not visible. I want field 5 to be visible if any of 1-4 are not null but I want it to go back to being non-visible if all of 1-4 are null.

So far I've tried many ways of addressing this with the latest being:

Private Sub IiF()
IiF OtherDeliveriestoUNK.Value = Null
IiF OtherAlternatePort.Value = Null
IiF OtherNameofAltPort.Value = Null
IiF OtherPreferUNK.Value = Null
ListOtherSpeciesUNK.Visible = False
Label445.Visible = False
ListOtherSpeciesUNK.Visible = True
Label445.Visible = True
End If
End If
End If
End If