Solved

column width and form in datasheet mode

Posted on 2014-12-05
6
262 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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

758 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

23 Experts available now in Live!

Get 1:1 Help Now