Unable to set focus to another field in order to hide Calendar Control

  • Thread starter Thread starter Don
  • Start date Start date
D

Don

Everything is working fine except that, when the user clicks the
calendar date and the PictureDate field updates, the Calendar Control
won't hide. I get an error message stating that Access can't set the
focus to control PictureDate.

Here's my code:

Private Sub Calendar7_Click()
PictureDate.Value = Calendar7.Value
PictureDate = SetFocus
Calendar7.Visible = False
End Sub

I've tried putting the code in an AfterUpdate field for PictureDate.
That didn't work either.

Thanks in advance for any help.
 

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

Similar Threads


Back
Top