Results 1 to 2 of 2
  1. #1
    Paul H's Avatar
    Paul H is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Location
    Richmond, VA
    Posts
    591

    A Datasheet Conundrum

    Hello folks,

    I've been playing with datasheets for weeks now. It seems like I've learned a lot, but I've been having problems setting column widths in certain cases.

    There are three fields that vary widely in widths and I've found I can use the On Current event to resize them on the run. I have two forms. On one it works like magic. On the second one I am stumped. I've been using the .columnwidth = -2 very successfully, but on Form 2 it ignores whatever value I put in.

    Here is an example I used to test the code.

    Code:
     
     
    ' Me.ID_1.ColumnWidth = 4000
    ' MsgBox "Column width is " & Me.ID_1.ColumnWidth
    The message I get back is
    Column width is 1860
    This gives me the same result.
    Code:
     
     
    ' Me.ID_1.ColumnWidth = -2
    ' MsgBox "Column width is " & Me.ID_1.ColumnWidth
    I'm stumped. Any ideas?

  2. #2
    Paul H's Avatar
    Paul H is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Location
    Richmond, VA
    Posts
    591
    Here's another clue. I dragged the column wider in Form View, saved it and it retained the width I set. It still doesn't respond to code.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Conditional Criteria Conundrum
    By nypedestrian in forum Queries
    Replies: 2
    Last Post: 09-01-2011, 12:23 PM
  2. Replies: 4
    Last Post: 11-03-2010, 08:17 AM
  3. No new records in datasheet
    By eww in forum Forms
    Replies: 4
    Last Post: 10-14-2010, 12:40 PM
  4. Datasheet and Code
    By dbprogman in forum Forms
    Replies: 7
    Last Post: 07-26-2010, 07:39 AM
  5. Datasheet View
    By Evgeny in forum Programming
    Replies: 6
    Last Post: 04-28-2010, 10:17 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums