Option group reset

  • Thread starter Thread starter Maggie
  • Start date Start date
M

Maggie

How do I get my option group to reset to no value every
time it is in a new record?
It seems like a simple thing to do - but I can't figure it
out.

Thanks,

Maggie
 
I don't have a default value defined. I did do something
different based on an answer I got from an earlier post.

I wanted the options to populate specific text instead of
numbers so I added the following to afterupdate

Private Sub Overalloptiongroup_AfterUpdate()
If Me.Overalloptiongroup = 1 Then
Me.Overall = "Excellent"
ElseIf Me.Overalloptiongroup = 2 Then
Me.Overall = "Good"
ElseIf Me.Overalloptiongroup = 3 Then
Me.Overall = "Fair"

ElseIf Me.Overalloptiongroup = 4 Then
Me.Overall = "Poor"

ElseIf Me.Overalloptiongroup = 5 Then
Me.Overall = "N/A"


Else
Me.Overalloptiongroup = "null"
End If
End Sub

Is there something else I can add in there to reset the
next record to no value?

Thanks,

Maggie
 
Hmm, I don't know WHY it should assume a specific value
without a default value assigned, but you could assign a
Null value to the option group in the Form Current event:

If Me.NewRecord Then
Me!YourOptionGroup = Null
End IF

Also, you can change the labels of your radio buttons to
provide a visual cue to their meaning in their Caption
property.

HTH
Kevin Sprinkel
 
Back
Top