Avatar of SteveL13
SteveL13
Flag for United States of America asked on

Field width in datasheet view not cooperating

I have a form which when opened in single form view is fine.  But I also want to open this form in datasheet view via a command button on the main menu and set one of the fields to be a set length which is wider than the user sees it in form view.

How can this be done?

--Steve
Microsoft Access

Avatar of undefined
Last Comment
Jeffrey Coachman

8/22/2022 - Mon
Jeffrey Coachman

If you open the form in Datasheet view, then resize the columns to the size you want, ...they should remain that way when you close and reopen the form...

JeffCoachman
SOLUTION
Rey Obrero (Capricorn1)

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
Gustav Brock

Set the property ColumnWidth of the column to the desired width.

/gustav
SteveL13

ASKER
I have tried adjusting the column width when the form opens in datasheet view but it won't remember it the next time I open it.  Here is the code for the onclick event of the command button:

DoCmd.OpenForm "frmTourGuides", acFormDS, , , acFormEdit, acWindowNormal

Remember, I have a form which when opened in single form view is fine.  But I also want to open this form in datasheet view via a command button on the main menu and set one of the fields to be a set length which is wider than the user sees it in form view.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Rey Obrero (Capricorn1)

did you save the form after adjusting the column width?



.
SteveL13

ASKER
Yes.
ASKER CERTIFIED SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.