Has the code ever run without opening in Design View and then running it in Form View? If 'no,' I suspect that the Folder the file resides in needs to be declared as 'Trusted.'
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)
Access will run code, when going from Design View to running it, in Form View, even with the Folder not 'trusted,' but will balk when opened directly in Form View, under the same conditions.
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007