Results 1 to 2 of 2
  1. #1
    honey2wood is offline Novice
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    25

    Checkbox control

    Hi

    I have a form for recording part details.
    Some of the details I require are within a subform. This subform has 2 fields. one is the position is a process the part is the other is a check box.
    As the part moves through the process the box is ticked to say where it is in the process. This then displays at what point in the process the part is in.
    Thats all fine but if someone forgets to untick a part of the process the item can be in two or more different states.
    What I need is a way to only have one box ticked in the subform at any one time.

    I have tried
    Private Sub Checking_Click()
    If [Form]![Checkbox 1] = True Then


    '[Form]![Checkbox 2]= False
    '[Form]![Checkbox 3] = False
    End If
    End Sub
    But this doesn't work. I think it is close but not quite there

    Thansk for reading this and for any help you can give.

    Graham

  2. #2
    Toyman is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    233
    Quote Originally Posted by honey2wood View Post
    Hi

    I have a form for recording part details.
    Some of the details I require are within a subform. This subform has 2 fields. one is the position is a process the part is the other is a check box.
    As the part moves through the process the box is ticked to say where it is in the process. This then displays at what point in the process the part is in.
    Thats all fine but if someone forgets to untick a part of the process the item can be in two or more different states.
    What I need is a way to only have one box ticked in the subform at any one time.

    I have tried
    Private Sub Checking_Click()
    If [Form]![Checkbox 1] = True Then
    '[Form]![Checkbox 2]= False
    '[Form]![Checkbox 3] = False
    End If
    End Sub
    But this doesn't work. I think it is close but not quite there

    Thansk for reading this and for any help you can give.

    Graham
    Use a Option Group instead. The Option Group consist of check boxes, each represents a value from 1 to as many check boxes you have. The Option Group then takes on the value depending on which check box is checked. One one check box can be checked at any time. You can then bound your control to the option group.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 10-13-2011, 03:36 PM
  2. Replies: 1
    Last Post: 05-18-2011, 07:23 AM
  3. Replies: 6
    Last Post: 03-14-2011, 09:37 AM
  4. checkbox
    By Suresh in forum Forms
    Replies: 0
    Last Post: 12-19-2007, 01:30 AM
  5. Sending control to specific control
    By wasim_sono in forum Programming
    Replies: 2
    Last Post: 04-19-2007, 08:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums