Clay,
The snippet of code I gave you is very unlikely to have produced this error,
chances are it is coming from another line in your code. When you get the
error message, click Debug and Access will highlight the line of code
producing the error in the VB window, which is a good start.
Now, in my experience, this kind of error ususally occurs when you reference
a control's Text or Value property while it does not have the focus. Look
for a reference like Me.SomeControl.Text or Me.SomeControl.Value. If this is
indeed the case, just wipe out the last part of the reference, and use just
Me.SomeControl instead, which by default refernces a conrtrol's value
property.
If this is not the case and you still need help, repost with your code and
indicate the line the error occurs on.
HTH,
Nikos