Avatar of pdvsa
pdvsa
Flag 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
Microsoft Access

Avatar of undefined
Last Comment
Jeffrey Coachman

8/22/2022 - Mon
Jeffrey Coachman

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

Private Sub Form_Close()
    DoCmd.RunCommand acCmdSave
End Sub
Jeffrey Coachman

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
PatHartman

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Dale Fye

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.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
pdvsa

ASKER
that worked.   thank you
Jeffrey Coachman

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