trying to option group delete field data

S

scottyboyb

Greetings, another trip to the well. The following code works except for:
Me!grpHowPaid.Value = ""

Here is the code. It is in the after update and form current events. Can
someone please tell me what little secret I do not know about deleting values
in option groups?

Private Sub chkPaid_AfterUpdate()
If Me!chkPaid = False Then
Me!txtPaymentDate.Visible = False
Me!grpHowPaid.Visible = False
Me!txtPaymentDate.Value = ""
Me!grpHowPaid.Value = ""
Else
Me!txtPaymentDate.Visible = True
Me!grpHowPaid.Visible = True
End If
End Sub

Many thanks,
Scott
 
A

Allen Browne

Set the values to Null, not to a zero-length string, e.g.:
Me!txtPaymentDate = Null

This would be a really bad idea in the form's Current event though (assuming
they are bound controls.) As soon as you visit any record, you would lose
the contents of these fields.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top