Symee

04-11-2003, 08:07 AM

Hi,

I am designing a form with four check boxes on it. I want to be able to only have one box checked at any one time. I have written the following code:

Private Sub Not_Rated_Click()

'On this page only one box is allowed to be checked at one time, so the code below _

clears all of the other boxes when not rated box is clicked:

Not_Rated = 1

OneStar_Rated = 0

TwoStar_Rated = 0

ThreeStar_Rated = 0

FourStar_Rated = 0

End Sub

Private Sub OneStar_Rated_Click()

'On this page only one box is allowed to be checked at one time, so the code below _

clears all of the other boxes when one star box is clicked:

Not_Rated = 0

OneStar_Rated = 1

TwoStar_Rated = 0

ThreeStar_Rated = 0

FourStar_Rated = 0

End Sub

Private Sub TwoStar_Rated_Click()

'On this page only one box is allowed to be checked at one time, so the code below _

clears all of the other boxes when two star box is clicked:

Not_Rated = 0

OneStar_Rated = 0

TwoStar_Rated = 1

ThreeStar_Rated = 0

FourStar_Rated = 0

End Sub

Private Sub ThreeStar_Rated_Click()

'On this page only one box is allowed to be checked at one time, so the code below _

clears all of the other boxes when three star box is clicked:

Not_Rated = 0

OneStar_Rated = 0

TwoStar_Rated = 0

ThreeStar_Rated = 1

FourStar_Rated.Value = 0

End Sub

Private Sub FourStar_Rated_Click()

'On this page only one box is allowed to be checked at one time, so the code below _

clears all of the other boxes when four star box is clicked:

Not_Rated = 0

OneStar_Rated = 0

TwoStar_Rated = 0

ThreeStar_Rated = 0

FourStar_Rated = 1

End Sub

When I run this code it comes up with run time error 28 "Out of Stack Space"

Can anyone help?

Thanks

Symee

I am designing a form with four check boxes on it. I want to be able to only have one box checked at any one time. I have written the following code:

Private Sub Not_Rated_Click()

'On this page only one box is allowed to be checked at one time, so the code below _

clears all of the other boxes when not rated box is clicked:

Not_Rated = 1

OneStar_Rated = 0

TwoStar_Rated = 0

ThreeStar_Rated = 0

FourStar_Rated = 0

End Sub

Private Sub OneStar_Rated_Click()

'On this page only one box is allowed to be checked at one time, so the code below _

clears all of the other boxes when one star box is clicked:

Not_Rated = 0

OneStar_Rated = 1

TwoStar_Rated = 0

ThreeStar_Rated = 0

FourStar_Rated = 0

End Sub

Private Sub TwoStar_Rated_Click()

'On this page only one box is allowed to be checked at one time, so the code below _

clears all of the other boxes when two star box is clicked:

Not_Rated = 0

OneStar_Rated = 0

TwoStar_Rated = 1

ThreeStar_Rated = 0

FourStar_Rated = 0

End Sub

Private Sub ThreeStar_Rated_Click()

'On this page only one box is allowed to be checked at one time, so the code below _

clears all of the other boxes when three star box is clicked:

Not_Rated = 0

OneStar_Rated = 0

TwoStar_Rated = 0

ThreeStar_Rated = 1

FourStar_Rated.Value = 0

End Sub

Private Sub FourStar_Rated_Click()

'On this page only one box is allowed to be checked at one time, so the code below _

clears all of the other boxes when four star box is clicked:

Not_Rated = 0

OneStar_Rated = 0

TwoStar_Rated = 0

ThreeStar_Rated = 0

FourStar_Rated = 1

End Sub

When I run this code it comes up with run time error 28 "Out of Stack Space"

Can anyone help?

Thanks

Symee