?
Solved

Hiding Fields in Access 2007 SubForm

Posted on 2014-02-24
6
Medium Priority
?
907 Views
Last Modified: 2014-02-26
I have an Access 2007 form, that contains a sub-form, and I would like to hide a field that is part of the sub-form.  I have the field defined on the sub-form because it is retrieved as part of a query that is used to populate the sub-form.  I need the field there to serve as an index to another table, if someone clicks / double clicks on a line on the sub-form.  I have set the field as Visible --> NO, but that doesn't seem to do it.

Any help would be appreciated.

Thanks..Tom
0
Comment
Question by:tpigielski
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 39

Expert Comment

by:PatHartman
ID: 39883432
Setting the visible property to No is the correct method if you never want the control to be visible.  Do you have code that is resetting the .visible property?
0
 

Author Comment

by:tpigielski
ID: 39883962
I'm not using any code...I'm just setting the control properties in the "properties" window for the control
0
 
LVL 39

Expert Comment

by:PatHartman
ID: 39884001
There are two form views.  Form View and Layout View.  The field should be hidden in Form View and visible in Layout View.

I make the background of my "hidden" fields something bright and obnoxious like yellow.  That way, they stand out like a sore thumb if they are unhidden for some reason.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:tpigielski
ID: 39886825
Perhaps I wasn't clear enough in my explanation, but this is what I needed to do to make the fields hidden:

    Forms!frmsearchforperson!StudentListSubform.Form.Student_ID.ColumnHidden = True
    Forms!frmsearchforperson!LeadsListSubform.Form.Customer_ID.ColumnHidden = True

Tom
0
 

Author Comment

by:tpigielski
ID: 39888737
I've requested that this question be closed as follows:

Accepted answer: 0 points for tpigielski's comment #a39886825

for the following reason:

Other answers did not solve my problem
0
 
LVL 39

Accepted Solution

by:
PatHartman earned 1200 total points
ID: 39887299
If you had told us the subform was a datasheet view, we might have been able to answer the question.  Datasheet forms work differently from other form types.

Also, FYI, the field doesn't have to be bound to a control on the subform in order to be usable in VBA.  Only reports require the fields to be bound to controls and that is only because behind the scenes, Access rewrites your report RecordSource and eliminates all columns that are not bound to controls.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question