hide/display a field from a table with VBA code (1 Viewer)

aref

New member
Local time
Today, 14:35
Joined
Jan 10, 2023
Messages
27
Hello

If I want to hide/display a field from a table with code, what code should I write?
 

plog

Banishment Pending
Local time
Today, 08:35
Joined
May 11, 2011
Messages
11,648
A query.

You can't achieve what you want. A table is a technical tool. It's meant to be used by developers to achieve the data structure they need for their databases. That means giving them all the data available and not being able to "hide" some of it.

What is the ultimate end goal? What's the purpose of your desire to hide information? Perhaps we can come up with a better way to achieve your actual aim.
 

isladogs

MVP / VIP
Local time
Today, 14:35
Joined
Jan 14, 2017
Messages
18,240
End users should never work directly with tables or queries.
Create a form from your table. This will allow you to hide (or exclude) any fields you want.
Use datasheet view if you want it to look like a table
 

aref

New member
Local time
Today, 14:35
Joined
Jan 10, 2023
Messages
27
Thank you

I want to do this for learning However, if this option exists, it is a way to secure the fields
 

isladogs

MVP / VIP
Local time
Today, 14:35
Joined
Jan 14, 2017
Messages
18,240
The option doesn't exist. Nor is there any reason why it should do so.
It is possible to hide the entire table but not individual fields.
 

Users who are viewing this thread

Top Bottom