Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I keep a check box checked once it is selected.....

Status
Not open for further replies.

Lucylucy

IS-IT--Management
May 20, 2004
3
US
Someone, Please help! [ponytails]

I need to select a check box and keep it checked once I have selected it. i.e. In a form I have the option of selecting from either Active or Terminated, I want to be able to select one or the other but keep the one I select checked. If I exit out of forms and go back in the checks are gone. What should I do?

Thanks in advance! [ponytails]
 
Isn't the checkbox bound to a Yes/No field in a table? If it is, you don't have to worry about it, the checkbox will reflect whatever is in the table.

If it is unbound, then you will have to code it. Jim Lunde
compugeeks@hotmail.com
We all agree your theory is crazy, but is it crazy enough?
 
Hello! Thanks for your reply.

Well, the data type for these two field are yes/no in the table. I first created this by useing the option group from toolbox. I have several forms that require different information in them. My problem is, if I select a check box that selects Active all the froms then become Active, but I don't want this. I want to be able to select either Active or Terminated in each form by itself. I also want the the check box to be stay selected.

I apperciate any help. I am new to Access and have no clue how to use it. Thanks!
 
dear lucy,

as far as I understood you.

1)

You have several forms that rely on the data of a record in a table.
the record has 2 y/n fields active and terminated.
the state of the forms are different, so selecting active in the recordset does not lead to and active state of all forms .

If this is correct, you have to restructure your database.

you need an additional table that take the status of each recordset for the special form (is it action??).

table
recordsetID long
formname string
active y/n
terminated y/n

then you need to create queries for each form.

that link via the recordsetid and filters by the formname

2)

everycheckbox has an attribute called enabled. if you change this to enabled= false, if the value of the checkbox is true then the user cannot change the value anymore.

hmm, thinking about the event you have to trap. Could be some move_event of the recordset. (can't check it out as I haven't the programm available at the moment.)


HTH

kind regards Astrid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top