If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Maintaining column size in datasheet view
I have a database with several forms and subforms. All
the subforms are in datasheet view for ease of data entry and for quick viewing of data. Some of the datasheets span the entire width of the screen, so I have all the datasheet columns set up to be able to hold the data without needing to scroll horizontally. However, the column widths can still be adjusted manually, which sometimes happens accidentally by the users. When this results in larger columns, the horizontal scroll bar appears and the datasheet "jumps" horizontally when putting in data. Is there a way I can prevent the manual rezising of columns? You guys/gals are the greatest...you've always come to my rescue! |
#2
|
|||
|
|||
Maintaining column size in datasheet view
Here is a previous post of mine on this subject.
From: Stephen Lebans ) Subject: Freeze Column? View: Complete Thread (3 articles) Original Format Newsgroups: microsoft.public.access.forms, microsoft.public.access.formscoding, Date: 2003-12-24 11:53:00 PST For programmatic control for forms in Datasheet view my standard response is: 1) Michael Kaplan has an excellent article on manipulating Datasheets he http://msdn.microsoft.com/library/de.../en-us/dnsmart 01/html/sa01b1.asp 2) An API solution is he http://www.lebans.com/autocolumnwidth.htm The AutoSizing project also contains a method to FREEZE the ColumnWidths. After reading Michael's article you would then do something similiar along these lines: From: Bill Murphy ) Subject: Freezing columns in a continuous subform View this article only Newsgroups: microsoft.public.access.forms Date: 2004-03-31 13:03:23 PST Thanks Stephen. In Michael Kaplan's article I found a tip which led me to the answer. Here's some sample code that I am using in the load event of a data sheet subform which works well: ' Freeze each column needed Me![Project].SetFocus DoCmd.RunCommand (acCmdFreezeColumn) Me![Lender#].SetFocus DoCmd.RunCommand (acCmdFreezeColumn) Me![Loan#].SetFocus DoCmd.RunCommand (acCmdFreezeColumn) All three columns will be frozen at the left of the data sheet, and the user can scroll horizontally for all other columns in the data sheet. Bill -- HTH Stephen Lebans http://www.lebans.com Access Code, Tips and Tricks Please respond only to the newsgroups so everyone can benefit. "Susan" wrote in message ... I have a database with several forms and subforms. All the subforms are in datasheet view for ease of data entry and for quick viewing of data. Some of the datasheets span the entire width of the screen, so I have all the datasheet columns set up to be able to hold the data without needing to scroll horizontally. However, the column widths can still be adjusted manually, which sometimes happens accidentally by the users. When this results in larger columns, the horizontal scroll bar appears and the datasheet "jumps" horizontally when putting in data. Is there a way I can prevent the manual rezising of columns? You guys/gals are the greatest...you've always come to my rescue! |
Thread Tools | |
Display Modes | |
|
|