Hello, how to implement the procedure of clicking on the flag and hide the field in VBA? I know that want to assign - ColumnWidth=0.
Сomplete procedure fails. please help : Banghead:
Thanks for answer, but it is not, it is necessary that the field has shifted to the left or cleaned at all. It is necessary to remove the extra fields when printing, which are not included in the print margins.
Not 100% sure what you are trying to do. Things you have set to not be visible in the way I suggested will not show up when printing, if that was your concern.
Here's a picture h ttp:// oi60.tinypic.com/2ykx4ly . jpg
it is necessary that after clicking on the flag moved to the left
h tt p: // oi60.tinypic.com/2hz1my9 . jpg
so I asked about ColumnWidth
Ah I see what you mean now. Well perhaps the thing to try is just reducing column widths to small but non-zero amounts. Like set them to 0.1, which Access might allow you to do. If its small enough it will just look like a little line when you print it, so should be almost as if it's not there at all.
(assuming your data is a datasheet view form that is a subform of your main form, which is what is vaguely looked like from your picture earlier.
When you say "Code doesn't work", that doesn't really help. Need to know what error messages appeared if any, and which line of the code caused the error. Otherwise you'll be better off just googling the solution rather than asking for specific help on a forum
Ah okay, in that case the .ColumnWidth won't work, as I think it only works on datasheet view forms. For a continuous form I would recommend the .Visible method. Maybe try:
Code:
Forms![FormName]![FieldName].Visible = False
As It might have been something to do with the Me. part of the code used before that was stopping it work. It should work, as I've done this sort of things to fields countless times.