You have code in there that has the word RETURN, but a gosub was never called.
You could comment out the word RETURN. (you might need it later)
Well, that might be the case, but this is one of those error messages that frequently have a cause other than the stated one. You probably need to copy and paste you Form_Open, here, and maybe your Form_Load code, as well.
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007
so weird - I don't have the word RETURN in my VB code. Perhaps its equivalent is somewhere in one of the pesky macros. Anyway this (DoCmd.ShowToolbar "Ribbon", acToolbarNo) is the only code I have in the OnOpen event of my login form. I have removed it and put it in the OnLoad event.
Seems to be fine now. thanks ranman256
Thanks Linq. It is working working now. hopefully it will continue to do so
People put a lot of things in Form_Open that need to be in Form_Load, but these are usually things that refer to specific data in the Form, and at the Form_Open data is not yet available. But since this actually has to do with the Form's design, I can only surmise that the Ribbon hadn't, as yet, been substantiated when your command was trying to turn it off.
Good luck with your project!
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007