By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,466 Members | 1,756 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,466 IT Pros & Developers. It's quick & easy.

Form in View Mode Only will not open in MS Access 2003

P: 1
I have run into an odd problem I have never had in 15 years of messing around with MS Access.

I have a form which has buttons on a Option Group. When the user selects an option button, a tiny module runs that just closes the current form and opens the one they want to see. In this case, I want this form to be VIEW only and not allow edits. I am using the command of:
Expand|Select|Wrap|Line Numbers
  1.     DoCmd.Close acForm, "ActivityView", acSaveYes
  2.     DoCmd.OpenForm "Arrests", acNormal, , , acFormReadOnly, acWindowNormal
This works on every other form in my database, that records police activity for selected denizens of Glendale.

For some reason, I can save the form, then open and run it and it runs properly and opens the designated form in VIEW only mode. However, after that first time it no longer will open the form or work again. If I edit it, save it, I can then get it to work once, but no more.

I have compacted, repaired, and done everything else I can think of and have even recreated the form within the database, to no avail.

Perplexed and giddy in Glendale!

HELP?
Apr 9 '10 #1
Share this Question
Share on Google+
2 Replies


TheSmileyCoder
Expert Mod 100+
P: 2,321
Any code behind the form your opening?

I can't spot anything wrong with your approach, and it certainly sounds odd, the "working once" thing.

If you attach the db here, I can take a look.
Apr 9 '10 #2

NeoPa
Expert Mod 15k+
P: 31,186
I think this probably lies in the saving of forms. I'm not clear from your explanation which of the forms you're referring to when you say you saved "it", but as I suspect there's no situation where the design of the form should be updated during the execution of the code, this is probably immaterial.

If it really is your intention to save the design of any of your forms then perhaps you could explain your intentions more clearly. If not (as I suspect) then remove this from the code and see how things work in those circumstances.

PS. To save the data, if that's what you're intending, you can set the Dirty property of the form to False. Strangely, this doesn't roll back any changes, but saves them instead.
Apr 9 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.