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
591 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
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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Microsoft Office Picture Manager is not included in Office 2013. This comes as a shock to users upgrading from earlier versions of Office, such as 2007 and 2010, where Picture Manager was included as a standard application. This article explains how…
Outlook Free & Paid Tools
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
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…

840 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