Datasheet ColumWidth Problem

indesisiv

Access - What's that?
Local time
Today, 15:40
Joined
Jun 13, 2002
Messages
265
I am sure this is an easy thing but is there a simple way of setting all columnwidths in a datasheet view form to 0.

I assume that i need to loop around all of the fields but i am not sure how to do this.

Thanks for any help
Steve
:confused:
 
Called from a button on the main form

Forms!MainFormName!SubFormName!FieldName.ColumnWidth = 1
This will hide the field(s)

To set them back to fit the text
Forms!MainFormName!SubFormName!FieldName.ColumnWidth = -2

You may have to insert the line for each column

BTW Why do you want to set every column to 0 ?

HTH

Dave
 
I need to set all cause i am using one datasheet to show multiple things.
Just thought that if i could set them all then i could save time.
I am calling what to view from a combobox on the main form.
I will just have to write a procedure to do it all.

Thanks for the help
Steve
 

Users who are viewing this thread

Back
Top Bottom