Solved

What property do I set in ACCESS 2007 to prevent users from moving fields around within a form in datasheet view?

Posted on 2011-02-25
7
603 Views
Last Modified: 2012-05-11
I want to deny users the ability to move fields around in a form that is in a datasheet view.  I'd like to set this restriction without affecting other tools such as copy, paste, edit, delete, etc...

Thanks in Advance
rhlopez
0
Comment
Question by:rhlopez1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
ID: 34982058
I think you would need to use a continuous form rather than a datasheet.
0
 

Author Comment

by:rhlopez1
ID: 34982099
Am I to understand that, in a form, in datasheet view, I cannot set this restriction?
0
 
LVL 77

Expert Comment

by:peter57r
ID: 34982485
Not as far as I know.
After all it's stuff like this that datasheets are for.  If the user finds it better to see things in a particular way, who is the developer to say they are wrong?

You can stop users adding fields and you can re-instate column positions whenever the form is opened using code.

Sub stopschemachanges()  ' applies to all datasheets in database - so run this from the startup form

On Error Resume Next

CurrentDb.Properties.Append CurrentDb.CreateProperty("AllowDatasheetSchema", vbBoolean, True)
CurrentDb.Properties("AllowDatasheetSchema") = False


End Sub

' setting column order in the form open event procedure

Me.firstcolumnname ColumnOrder = 1
Me.secondcolumnname.ColumnOrder = 2
and so on...you could use the same technique to set column widths.
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 34982491
Correct.

0
 
LVL 10

Expert Comment

by:conagraman
ID: 34982518
you can freeze the columns

in the onload code of your datasheet put this code

DoCmd.RunCommand acCmdFreezeColumn

this will freeze the columns but if the user right clicks the form a right click menu will appear giving them the option of unfreezing the columns.
you can keep the right click menu from poping up by
going to the form property window click the "other" tab and change the "shortcut menu" option from yes to no.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 34983211
Then you should have selected Pete's post.
;-)

I have requested that this be changed
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question