If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
trying to option group delete field data
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 |
#2
|
|||
|
|||
trying to option group delete field data
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. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "scottyboyb" wrote in message ... 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 |
Thread Tools | |
Display Modes | |
|
|