G
Guest
I'm not totally familiar with all the things you can do in VBA in Access. I
created a form in Access 2000. The user enters data and clicks a button and
the table is updated. No biggie. But, after the table is updated, I wanted
to clear the screen and leave it fresh for another entry. I know how to do
that with something like this:
Dim i As Integer
For i = 0 To Me.Count - 1
If TypeOf Me(i) Is TextBox Then
Me(i) = ""
End If
Next
But that leads me to a problem in that some of the text fields are dates and
some of them are integers and if they are not filled in properly, an error
occurs because a blank cannot be put in a date field.
What I was wondering is, how do I set the form back to the way it was when
the form originally opened? At that point, I could enter data in just one
field and then click update and it was accepted. I guess the fields are null
when the form first opens? I'm not sure how that works. I know I could go
back and do all the checking for blanks, but there are 116 fields and I'm
just feeling lazy.
Is there some function or anything in Access that
will allow a form to be reset to exactly the way it was when originally
opened?
Thanks,
Jennifer
created a form in Access 2000. The user enters data and clicks a button and
the table is updated. No biggie. But, after the table is updated, I wanted
to clear the screen and leave it fresh for another entry. I know how to do
that with something like this:
Dim i As Integer
For i = 0 To Me.Count - 1
If TypeOf Me(i) Is TextBox Then
Me(i) = ""
End If
Next
But that leads me to a problem in that some of the text fields are dates and
some of them are integers and if they are not filled in properly, an error
occurs because a blank cannot be put in a date field.
What I was wondering is, how do I set the form back to the way it was when
the form originally opened? At that point, I could enter data in just one
field and then click update and it was accepted. I guess the fields are null
when the form first opens? I'm not sure how that works. I know I could go
back and do all the checking for blanks, but there are 116 fields and I'm
just feeling lazy.

will allow a form to be reset to exactly the way it was when originally
opened?
Thanks,
Jennifer