Reset Unbound Form for Blanks (1 Viewer)

themurph2000

Fat, drunk, and stupid
Local time
Today, 04:34
Joined
Sep 24, 2007
Messages
181
This is a bit of an unusual one. I have an unbound form with a set of 17 text boxes that users can input order numbers in and receive data on those orders, depending on the report they select.

What I need to find out is if there is a way to create a command button or macro to clear the data out of those boxes with a click of a mouse.

Any ideas?
Thanks. :)
 

DCrake

Remembered
Local time
Today, 09:34
Joined
Jun 8, 2005
Messages
8,632
Create a private Sub called ClearUnboundControls

Code:
Private Sub ClearUnboundControls()

Me.FieldName1 = ""
Me.FieldName2 = ""
etc

End Sub

Then on the Onclick event of the command button

Code:
Call ClearUnboundControls

Substitute FieldName1,FieldName2 with your actual form controls
 

themurph2000

Fat, drunk, and stupid
Local time
Today, 04:34
Joined
Sep 24, 2007
Messages
181
Create a private Sub called ClearUnboundControls

Code:
Private Sub ClearUnboundControls()
 
Me.FieldName1 = ""
Me.FieldName2 = ""
etc
 
End Sub

Then on the Onclick event of the command button

Code:
Call ClearUnboundControls

Substitute FieldName1,FieldName2 with your actual form controls

Ah, OK. I thought there was one all-encompassing command I could have used. I thought Me.Refresh would have worked, but it didn't.

Thanks!
 

Users who are viewing this thread

Top Bottom