From
v2007 forward Access files need to be in a
Folder that has been declared as '
Trusted.' If this hasn't been done,
code will run when going from
Design View to
Form View, but not when the
Form is independently opened in
Form View. Perhaps this was done in your previous project but not in this one?
To "
Trust" your folder, click:
- Office Button (top left)
- Access Options (bottom of dialog)
- Trust Center (left)
- Trust Center Settings (button)
- Trusted Locations (left)
- Add new location (button)
The code works, when going from
Design View to
Form View, because the Access security is only invoked when
opening the Form directly, i.e. clicking on the
Form in the
Navigation Pane. removed
Linq
;0)>