Hello,
I'm working on a form (frmVisit) that users will fill out to request access for visitors. One control, txtZone, is for the user to select what level of access their visitor will need. What I would like to happen is when txtZone has the focus, frmZone, which is just a detailed description of the available zones, opens on the bottom half of the screen, and immediately sends the focus back to txtZone on frmVisit. When txtZone loses focus, the form would close. I've tried this with the following code...
Private Sub txtZone_GotFocus()
'Open frmZone for reference, and returns the cursor to the main form
Dim strExp As String
Dim strControl As String
Dim strForm As String
strExp = "frmZone"
strForm = "frmVisit"
strControl = "txtZone"
'DoCmd.OpenForm strExp
'DoCmd.SelectObject acForm, strForm
'DoCmd.GoToControl strControl
End Sub
When I put the cursor on txtZone, all of the icons on the toolbar, the caption on frmVisit, and the writing on the bottom of the screen flash for about 10 seconds before the form opens. I'm assuming that when I add code for txtZone's LostFocus to close frmZone, things will really get ugly. I'm guessing there must be a better way to get this to work the way I want. Any suggestions?
Thank you for your help.