My current method for "resetting" the form is by using a
macro that closes the form, then re-opens it. . . it
works but it is not very smooth looking.
Any ideas would be greatly appreciated.
DV
Here is some sample code from a criteria form that I use. Hope it helps. The
error numbers in the error handler take care of trying to set a control to
null when it is a type that doesn't have a value.
Gary Miller
' **************************************
Private Sub cmdReset_Click()
On Error GoTo ResetError
Dim Frm As Form, Ctl As Control
Set Frm = Me
For Each Ctl In Frm
Ctl.Value = Null
Next Ctl
ResetError:
If Err = 2119 Or Err = 438 Or Err = 2448 Then
Resume Next
ElseIf Err > 0 Then
MsgBox Err & ": " & Err.Description
End If
End Sub
*************************************************
"Doug Vernon" <dve...@sewsus.com> wrote in message
news:01c101c35dcb$18335f30$a101...@phx.gbl...
--
Joan Wild
Microsoft Access MVP
"Doug Vernon" <dve...@sewsus.com> wrote in message
news:004601c35dd3$dbe338d0$a501...@phx.gbl...