Tick Boxes in Subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a subform based on a table. It contains two tick boxes, 'new' and 'refurbished', and the manager wants only one to be allowed to be checked, not both.
Is there any code to do this, preferably without making chages to the table which they are based on
Thank You
 
Why don't you use a combo box based on a lookup table? It
would be much easier and would limit the selection to only
one of the options in the list.

-----Original Message-----
I have a subform based on a table. It contains two tick
boxes, 'new' and 'refurbished', and the manager wants only
one to be allowed to be checked, not both.
Is there any code to do this, preferably without making
chages to the table which they are based on?
 
Hi Alicia,
A radio button option group might be another option
you could consider.

Hope This Helps
-----Original Message-----
I have a subform based on a table. It contains two tick
boxes, 'new' and 'refurbished', and the manager wants only
one to be allowed to be checked, not both.
Is there any code to do this, preferably without making
chages to the table which they are based on?
 
If the choices are new or refurbished, then why display two checkboxes? If
product is new, then checkbox 1 is checked, else it is re-furbished.

HTH
Damon

Alicia said:
I have a subform based on a table. It contains two tick boxes, 'new' and
'refurbished', and the manager wants only one to be allowed to be checked,
not both.
 
Although I agree with Damon for the most part, if you really want two
choices with only one 'checked' it seems like a good time to use radio
buttons instead of check boxes.

fwiw
Steve
 
It is too late to change to radio boxes as I have 996 entries!
I have tried and it lost whether all these 996 machines are new or refurbished. Luckily I didn't save
Is there definately no code I can use
Thanks
 
Here is one solution, only one checkbox can be checked. However, it doesn't
prevent NO checkboxes being checked. For that you would have to add some
code to determine if both checkboxes are false.

HTH
Damon


Private Sub Chk1_AfterUpdate()
If Chk1 = True Then
Me!chk2.Enabled = False
Else
If Chk1 = False Then
Me!chk2.Enabled = True
End If
End If

End Sub

Private Sub chk2_AfterUpdate()
If chk2 = True Then
Me!Chk1.Enabled = False
Else
If chk2 = False Then
Me!Chk1.Enabled = True
End If
End If

End Sub
Alicia said:
It is too late to change to radio boxes as I have 996 entries!
I have tried and it lost whether all these 996 machines are new or
refurbished. Luckily I didn't save!
 
Back
Top