rhlopez1
asked on
What property do I set in ACCESS 2007 to prevent users from moving fields around within a form in datasheet view?
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
Thanks in Advance
rhlopez
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.Appen d CurrentDb.CreateProperty(" AllowDatas heetSchema ", vbBoolean, True)
CurrentDb.Properties("Allo wDatasheet Schema") = False
End Sub
' setting column order in the form open event procedure
Me.firstcolumnname ColumnOrder = 1
Me.secondcolumnname.Column Order = 2
and so on...you could use the same technique to set column widths.
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.Appen
CurrentDb.Properties("Allo
End Sub
' setting column order in the form open event procedure
Me.firstcolumnname ColumnOrder = 1
Me.secondcolumnname.Column
and so on...you could use the same technique to set column widths.
Correct.
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.
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.
Then you should have selected Pete's post.
;-)
I have requested that this be changed
;-)
I have requested that this be changed
ASKER