Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Change the default value of a checkbox to its current value

Posted on 2004-10-13
8
Medium Priority
?
359 Views
Last Modified: 2012-05-05
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!
0
Comment
Question by:katerpillar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 39

Expert Comment

by:stevbe
ID: 12296786
you need to savwe trhe definition when the form closes ...

DoCmd.Close acForm, "MyForm", acSaveYes

Steve
0
 

Author Comment

by:katerpillar
ID: 12296894
I'm already doing that.
0
 

Author Comment

by:katerpillar
ID: 12296956
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
Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

 
LVL 11

Accepted Solution

by:
BillPowell earned 560 total points
ID: 12296985
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
 

Author Comment

by:katerpillar
ID: 12297236
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
 
LVL 51

Expert Comment

by:Gustav Brock
ID: 12297319
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
 
LVL 11

Expert Comment

by:BillPowell
ID: 12297650
Not sure about A97, but check in your properties in the Other tab.  Thats where it is in A2002.
0
 

Author Comment

by:katerpillar
ID: 12297813
Have decided to do it in database properties - thanks guys.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question