Solved

column width and form in datasheet mode

Posted on 2014-12-05
6
283 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 37

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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
LVL 48

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

688 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