469,126 Members | 1,299 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,126 developers. It's quick & easy.

Prevent user to change the size or order of the columns of datasheet subform in Acces

93 64KB
I have a form with subform in datasheet view. I want end user not to modify the order and size of the columns. How is it possible?
Jan 20 '19 #1
2 1834
8,800 Expert 8TB
  1. Should a User change the order of Columns in a Datasheet Subform, I do not think that that change will persist once the Form is Closed then Opened.
  2. Using the Order Details Subform of the Northwind Sample Database as an example, at any given time the Column Widths in the Subform can be set to that Column's Optimal Width, as in:
    Expand|Select|Wrap|Line Numbers
    1. Const conOPTIMAL_WIDTH = -2
    3. With Me![sbfOrderDetails].Form
    4.   ![Product ID].ColumnWidth = conOPTIMAL_WIDTH
    5.   ![Quantity].ColumnWidth = conOPTIMAL_WIDTH
    6.   ![Unit Price].ColumnWidth = conOPTIMAL_WIDTH
    7.   ![Discount].ColumnWidth = conOPTIMAL_WIDTH
    8.   ![Extended Price].ColumnWidth = conOPTIMAL_WIDTH
    9.   ![Status Name].ColumnWidth = conOPTIMAL_WIDTH
    10. End With
  3. Hope this is what you are looking for.
Jan 21 '19 #2
32,162 Expert Mod 16PB
Like Button :-)
Jan 21 '19 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Thomas Huber | last post: by
3 posts views Thread by Thelma Lubkin | last post: by
1 post views Thread by perspolis | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.