I have a form (frm_Inspection) with a sub form (frm_Inspection_Sub).
on the sub form, I have a couple of fields, one being named "Insp_SampleConditionScore_ID_Item".
When that field gets the focus, I have set it so that another form (frm_PopupForm_Examples) opens automaticaly, with examples of entries. The popup form is set as "popup" so it stays on top of all other forms, but not "Modal" so the focus can be moved to the other forms.
The problem I have, is that I need it so that when the popup form opens, it sends the focus back to the calling field, while leaving itself in position (i.e. not closing).
I think this may be a problem because:
SUB - Get Focus
SUB - Opens popup
POP - Popup Form opens
POP - returns focus
SUB - Get Focus
SUB - Opens popup
POP - Popup Form opens
Causing a loop...
Although if I use the following code:
It doesn't switch the focus...
Any help greatly appreciated.
Aubs
on the sub form, I have a couple of fields, one being named "Insp_SampleConditionScore_ID_Item".
When that field gets the focus, I have set it so that another form (frm_PopupForm_Examples) opens automaticaly, with examples of entries. The popup form is set as "popup" so it stays on top of all other forms, but not "Modal" so the focus can be moved to the other forms.
The problem I have, is that I need it so that when the popup form opens, it sends the focus back to the calling field, while leaving itself in position (i.e. not closing).
I think this may be a problem because:
SUB - Get Focus
SUB - Opens popup
POP - Popup Form opens
POP - returns focus
SUB - Get Focus
SUB - Opens popup
POP - Popup Form opens
Causing a loop...
Although if I use the following code:
Code:
Private Sub Form_Load()
[COLOR=green]'check if the form should open. (Works fine)[/color]
If Me.ONorOFF_Check = True Then DoCmd.Close
Forms![COLOR=red]frm_Inspection_Sub[/color]![COLOR=blue]Insp_SampleConditionScore_ID_Item[/color].SetFocus
End Sub
Any help greatly appreciated.
Aubs