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
Solved

Change the default value of a checkbox to its current value

Posted on 2004-10-13
8
346 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
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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
LVL 11

Accepted Solution

by:
BillPowell earned 140 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 49

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
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.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

790 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