[AccessD] Datasheet Subform column width a unhappily resetting

cjlabs cjlabs at att.net
Wed Jun 8 07:58:40 CDT 2011


You need to set the column width property for each text box when you load the form.

That's also how you hide columns in datasheet view -- text1.columnhidden = true


Carolyn Johnson


  ----- Original Message ----- 
  From: Robert Stewart 
  To: accessd at databaseadvisors.com 
  Sent: Wednesday, June 08, 2011 7:49 AM
  Subject: Re: [AccessD] Datasheet Subform column width a unhappily resetting


  William, for the order of the columns, change the tab order.

  I have no idea about the column widths.  I do not allow datasheet 
  mode in any of my programs.


  At 10:04 PM 6/7/2011, you wrote:
  >From: William Benson (VBACreations.Com) [mailto:vbacreations at gmail.com]
  >Sent: Monday, June 06, 2011 9:24 PM
  >To: Access Developers discussion and problem solving
  >Subject: Datasheet Subform column width a unhappily resetting
  >
  >Kind Sirs/Madams
  >
  >I had a database working pretty well, datasheet subforms on a main form. I
  >had expanded their widths manually, and was happy with everything. I would
  >shut the form, re-open it, the widths would stay as they were set. Then I
  >decided to add another field in between the first and second fields on the
  >subform. This was a little tricky to do because even though I inserted the
  >field in the correct location in terms of form view, when the form opens in
  >datasheet view, the field is tacked on at the end. I have in the past
  >guessed maybe the datasheet view wants to show controls (i.e., columns) in
  >the order in which they had been added to the form. So what I do to work
  >around this is I cut all the controls out of that subform in design view and
  >paste them on a different form's canvas, then cut them and paste them in the
  >order I want the columns to show in datasheet view. That seems crazy but it
  >works, because the controls get added to that form's controls collection
  >anew, and in the right order.
  >
  >OK, well all of a sudden I do this craziness, and I get partially the result
  >I want when the main form opens -- in that the datasheet subform does have
  >the new field and it is in the correct position. BUT ... no matter how many
  >times I stretch the columns, even SAVING the form before closing it, the
  >NEXT time I open it, the columns are all the same width. Any ideas why my
  >columnwidth settings are not being retained? I personally don't know if it
  >has anything to do with the way the controls were added to the form -- and
  >in fact I am now on my umpteenth such activity with the same form(s), and
  >the problem of the columnwidths never showed up until now. But something
  >changed since I added that field...

  Robert L. Stewart
  www.WeBeDb.com
  www.DBGUIDesign.com
  www.RLStewartPhotography.com 
  -- 
  AccessD mailing list
  AccessD at databaseadvisors.com
  http://databaseadvisors.com/mailman/listinfo/accessd
  Website: http://www.databaseadvisors.com


More information about the AccessD mailing list