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
608 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
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

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

Suggested Solutions

Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

734 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