[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 633
  • Last Modified:

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
0
rhlopez1
Asked:
rhlopez1
1 Solution
 
peter57rCommented:
I think you would need to use a continuous form rather than a datasheet.
0
 
rhlopez1Author Commented:
Am I to understand that, in a form, in datasheet view, I cannot set this restriction?
0
 
peter57rCommented:
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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
Jeffrey CoachmanMIS LiasonCommented:
Correct.

0
 
conagramanCommented:
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
 
Jeffrey CoachmanMIS LiasonCommented:
Then you should have selected Pete's post.
;-)

I have requested that this be changed
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now