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

me!checkbox.defaultvalue=me!checkbox.value
docmd.save

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

Please help me!
katerpillarAsked:
Who is Participating?
 
BillPowellConnect With a Mentor Commented:
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.

Bill
0
 
stevbeCommented:
you need to savwe trhe definition when the form closes ...

DoCmd.Close acForm, "MyForm", acSaveYes

Steve
0
 
katerpillarAuthor Commented:
I'm already doing that.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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.
0
 
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.
0
 
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.

/gustav
0
 
BillPowellCommented:
Not sure about A97, but check in your properties in the Other tab.  Thats where it is in A2002.
0
 
katerpillarAuthor Commented:
Have decided to do it in database properties - thanks guys.
0
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.

All Courses

From novice to tech pro — start learning today.