By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,914 Members | 1,123 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,914 IT Pros & Developers. It's quick & easy.

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

P: 90
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
Share this Question
Share on Google+
2 Replies

Expert 5K+
P: 8,638
  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

Expert Mod 15k+
P: 31,492
Like Button :-)
Jan 21 '19 #3

Post your reply

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