Jackpotgee
Registered User.
- Local time
- Today, 22:00
- Joined
- Jun 7, 2007
- Messages
- 27
Hi,
I have a large main data entry form which has a button on which opens a second smaller form. The Main form is still visible behind it.
I want the smaller form to remain on top even if the user clicks on the Main form in the background. - The only way the user should be able to get rid of the smaller form is to use the close button.
Currently -
I have a public boolean variable that is set to false when the small form is opened.
If the user clicks the close button on the second form then this varialbe is updated to True.
I then use the on deactivate event on the smaller form as below.
What is it i am doing wrong with the SetFocus method? - Is this the correct method to use?
Thanks in advance
I have a large main data entry form which has a button on which opens a second smaller form. The Main form is still visible behind it.
I want the smaller form to remain on top even if the user clicks on the Main form in the background. - The only way the user should be able to get rid of the smaller form is to use the close button.
Currently -
I have a public boolean variable that is set to false when the small form is opened.
If the user clicks the close button on the second form then this varialbe is updated to True.
I then use the on deactivate event on the smaller form as below.
Code:
Private Sub Form_Deactivate()
On Error GoTo ErrorProc
If ClsFrm = True Then GoTo ExitProc Else
Forms!Frm_AddPartner!NewFirstName.SetFocus = True
ExitProc:
Exit Sub
ErrorProc:
MsgBox Err.Description
Resume ExitProc
End Sub
What is it i am doing wrong with the SetFocus method? - Is this the correct method to use?
Thanks in advance