• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 369
  • Last Modified:

Change the default value of a checkbox to its current value

This is driving me up the wall... please somebody stop me reaching the ceiling!

All I want to do is save the value of a checkbox as its default value, so that if a user unticks it one time it will be unticked again the next time. Seems to me that I should be able to put


but that's no good - the default value changes but then when the form reopens it's reverted back.

Please help me!
1 Solution
you need to savwe trhe definition when the form closes ...

DoCmd.Close acForm, "MyForm", acSaveYes

katerpillarAuthor Commented:
I'm already doing that.
katerpillarAuthor Commented:
I just tried changing it to acSavePrompt and it doesn't prompt me - clearly Access doesn't recognise that a change has been made.
Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

Just a thought.
Is your "Allow Design Changes" property set to "All Views" or "Design View Only". If it is the latter then that could be the culprit.

katerpillarAuthor Commented:
I'm running in Access 97 - is there an equivalent property? If not, then at least I understand the problem now - I can't change form properties in form view. Might have to rethink this one.
Gustav BrockCIOCommented:
Save the setting in a system table of yours or a custom property - then read this value and set the default value of the checkbox at the OnOpen event of the form.

Not sure about A97, but check in your properties in the Other tab.  Thats where it is in A2002.
katerpillarAuthor Commented:
Have decided to do it in database properties - thanks guys.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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