471,892 Members | 1,343 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,892 software developers and data experts.

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

99 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 2304
ADezii
8,827 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
    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
    11.  
  3. Hope this is what you are looking for.
Jan 21 '19 #2
NeoPa
32,470 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
reply views Thread by YellowAndGreen | last post: by
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.