Solved

I need help hiding a column in an Access datasheet

Posted on 2015-01-06
1
209 Views
Last Modified: 2015-01-07
Hi Experts,
I use the code below to load an unlinked datasheet in my Access 2013 application.  I want to be able to hide the first column in the datasheet (the JobID.Column).  How can I do this?
Private Sub LoadJobVenues()
    Dim strSQL As String

    strSQL = "SELECT tblJob.JobID, tblJob.JobName, tblJob.JobtartDate,, tblJob.JobEndDate FROM tblJob WHERE (((tblJob.JobID)= " & intJobID & "));"
    
    Me.dataDisplaySubform.SourceObject = "Query.qryJobs"
    Me.dataDisplaySubform.Form.RecordSource = strSQL
    Me.dataDisplaySubform.Requery
    
    Me.dataDisplaySubform.Form.AllowEdits = False
    Me.dataDisplaySubform.Form.AllowAdditions = False
    Me.dataDisplaySubform.Form.AllowDeletions = False
End Sub

Open in new window


Thanks in advance,
mrotor
0
Comment
Question by:mainrotor
1 Comment
 
LVL 39

Accepted Solution

by:
Pratima Pharande earned 500 total points
ID: 40535035
you need to try something like  

Me.FieldName.ColumnHidden = True


refer for more details

http://www.mrexcel.com/forum/microsoft-access/520734-hide-field-column-subform-datasheet-view.html
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now