Run-time error '438'

  • Thread starter Sarah at DaVita
  • Start date
S

Sarah at DaVita

I have a form with numerous subforms. Within the subform I am using a
function to hightlight the field the user currently is in. This highlight on
and off is hooked to the got focus and lost focus event on each field the
user can tab to. On the main form I have a button to close the form. When
I click to close I get this error. It points to the hightlight function.
The hightlight function works great when I open each subform individually.
It also works when used in the main form. It only errors when I use the
close button. Can someone help me with this? I think it has to do with the
highlight trying to remove the color when I have clicked out of the form.
Below is what I have hooked to the lost focus.
Function RemoveHighlight()
Screen.ActiveControl.BackColor = vbWhite
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top