Solved

column width and form in datasheet mode

Posted on 2014-12-05
6
267 Views
Last Modified: 2014-12-05
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
0
Comment
Question by:pdvsa
6 Comments
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40483032
Try saving the form on the close event of the form:

Private Sub Form_Close()
    DoCmd.RunCommand acCmdSave
End Sub
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40483050
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
0
 
LVL 34

Accepted Solution

by:
PatHartman earned 500 total points
ID: 40483076
This behavior exists in newer versions of Access.  Older versions retained your settings at design time and even saved settings from run time so if user resized columns or reordered them, form would remember the setting.  Not any more.

I can't guarantee success but some combination of the following may get the resizing to stick.  It randomly works for me but I haven't been able to identify the trigger.  If it doesn't work, your only option is to add code to resize the columns when the form opens (and don't forget to write a nasty graham to MS for breaking this behavior).

1. In design view,
   a. resize field
   b. move it
   c. open the tab dialog and auto sequence
   d. save form
2. In layout view
   a. resize field
   b. move it
   c. save form
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 40483149
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.
0
 

Author Closing Comment

by:pdvsa
ID: 40483157
that worked.   thank you
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40483287
so my code did not work for you?
...just curious
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now