Hide fields using vba into a datasheet form

gstylianou

Registered User.
Local time
Today, 08:00
Joined
Dec 16, 2013
Messages
359
Hello all,

I have the following problem and I need your help:

Is it possible to hide some fields in a Datasheet using vba?
I need to do that because this form used into two different main forms as a subform and and I do not want some fields to appear in either.

Thanks in advance
 
Have you tried

Code:
Me.ControlName.Visible = False
Me.ControlName.Width = 0

Belay that, only seems to work for a continuous form. :(

Sorry.
 
Last edited:
Have you tried

Code:
Me.ControlName.Visible = False
Me.ControlName.Width = 0

Belay that, only seems to work for a continuous form. :(

Sorry.

Hi and thanks for your help but, it does't work..
 
No, I realised that when I tested it, it was on a continuous form that was made to look like a datasheet.

You could amend the source of the form for the situation on form load though.?
Do not select the fields you are trying to hide?
 
Last two links show 404 for me?, but all options can be found in the first link on the left.

Thank you MajP
 
Hi,

This is the solution, thanks all..!!

Forms!Products!ProductID.ColumnHidden = -1
 
A user can unhide the column in datasheet view - in case that matters.
 

Users who are viewing this thread

Back
Top Bottom