Visibility

willlobb

Board Regular
Joined
Mar 29, 2002
Messages
103
Hi,

Can anyone tell me how to set the visibility of a field in a form to either true or false using a macro. ie can anyone give me the code?

thanks very much,

Will
 
Hi Norie, thanks for your reply. Im pretty new to Access - im used to working with Filemaker Pro.

Where would I put the code for that function? and where in the function is the bit that says to hide the field?

Thanks very much,

Will
 
Upvote 0

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
You would put the function in a module. There is no code for hiding fields.

What the function does is return TRUE or FALSE depending on whether or not the form with the name given is open.

The way to use it would be like this:

Field1.Visibility = IsFormOpen("Main Form")
...

You would put this in the Open event procedure for the subform.
 
Upvote 0

Forum statistics

Threads
1,215,444
Messages
6,124,891
Members
449,194
Latest member
JayEggleton

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top