Link to home
Start Free TrialLog in
Avatar of pdvsa
pdvsaFlag for United States of America

asked on

column width and form in datasheet mode

experts, I am trying to increase the width of a column.  It is a form in datasheet.  I right click the column and change the width but it never saves that width.  I continually have to change it back to what I want when I open the form.

how do save?

thanks
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Try saving the form on the close event of the form:

Private Sub Form_Close()
    DoCmd.RunCommand acCmdSave
End Sub
BTW,

Another option might be to increase the column *height*. (to see more of the text, wrapped)

The column Height values seems to stick after the form is closed...

JeffCoachman
ASKER CERTIFIED SOLUTION
Avatar of PatHartman
PatHartman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I have found that if you open the datasheet form (by itself, not as a subform), change the width to what you want, then save the form before closing it, it will generally retain the width you assigned it.  However, for reliable use, and to allow users to size the fields the way they want, I would recommend you implement the technique mentioned in my article on Customizing datasheets to user needs.

This actually resorts to storing each users column width and positioning preferences in a table within your application.
Avatar of pdvsa

ASKER

that worked.   thank you
so my code did not work for you?
...just curious