How to clear an unbound form
How to clear an unbound form
(OP)
I have an unbound form that I enter a range of numbers (and other data) to populate a table. I use a command button to populate the data. When the button is pushed, how do I get the form to clear, so I can enter the next range of data?
I used to write code for another command button to clear a form (but those were bound forms). Here is the code I used
Private Sub Command_Click()
If me.dirty then me.undo
End Sub
This code does not work for the unbound form. What do I need to do?
Thanks in advance
I used to write code for another command button to clear a form (but those were bound forms). Here is the code I used
Private Sub Command_Click()
If me.dirty then me.undo
End Sub
This code does not work for the unbound form. What do I need to do?
Thanks in advance
RE: How to clear an unbound form
You can use:
Me.YourControl_1 = Null
Me.YourControl_2 = Null
Me.YourControl_3 = Null.......ect
Or:
Me.YourControl_1 = ""
Me.YourControl_2 = ""
Me.YourControl_3 = "" .......ect
This will have to be done to each control you want to clear.
HTH
RDH
Ricky Hicks
rdhicks@mindspring.com