Solved

I need help hiding a column in an Access datasheet

Posted on 2015-01-06
1
216 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Read about achieving the basic levels of HRIS security in the workplace.
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

770 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