View Full Version : Another option group problem


arage
03-27-2001, 11:44 AM
My option group is properly formatting new records in the AfterUpdate event of the option group. Problem is that these changes aren’t reflected when I scroll through the records.

If I I place the option group code in the forms Open event, then the first record’s option group criteria is fitted against ALL records in my dbase.

I cant seem to get my option group to format each inidividual record and then save that format for that one record.

‘this is the option group…

Private Sub frmPayableTo_AfterUpdate()
Call payableTo
End Sub

‘this is the format each record should hold against each record

Private Sub payableTo()

'dealer option button selected...

If frmPayableTo = 1 Then
Me.PayTo = Me.DealerName
Me.PayToAddress = Me.DealerAddress

Me.PayTo.Enabled = False
Me.PayToAddress.Enabled = False
End If

'other option button selected or BLANK...

If frmPayableTo = 0 Or frmPayableTo = 2 Then

If Not (IsNull(Me.DealerName) Or IsNull(Me.DealerAddress)) Then
MsgBox "Dealer name/address not allowed on Event form tab if you select OTHER", _
vbExclamation, "Error"
DealerName.setFocus
Exit Sub
End If

Me.PayTo.Enabled = True
Me.PayToAddress.Enabled = True

Me.PayTo = ""
Me.PayToAddress = ""

End If

End Sub