Hi all -
I have a from that has information icons that opens a separate form to help users make the right choice on a form. With each information form users are able to choose "Yes" or "No" and then it returns them back to the form they started. I am great to this point however I am having trouble setting the focus to the control the user original left the form from. Here is some basic info to help visualize:
Form A
Control 1
Control 2
Control 3
Form B
Information for Control 1
Form C
Information for Control 2
Form D
Information for Control 3
For Forms B - C I would like the form to close, open Form A and then set focus to the control that the form was providing information for.
For example, if you are on Form C and you make a decision, I want Form C to close, Form A to open and focus to be set to Control 2.
Any help would be greatly appreciated. Thanks.
Below is what I currently have: The problem is the last line and I have a feeling this is a simple fix...
I have a from that has information icons that opens a separate form to help users make the right choice on a form. With each information form users are able to choose "Yes" or "No" and then it returns them back to the form they started. I am great to this point however I am having trouble setting the focus to the control the user original left the form from. Here is some basic info to help visualize:
Form A
Control 1
Control 2
Control 3
Form B
Information for Control 1
Form C
Information for Control 2
Form D
Information for Control 3
For Forms B - C I would like the form to close, open Form A and then set focus to the control that the form was providing information for.
For example, if you are on Form C and you make a decision, I want Form C to close, Form A to open and focus to be set to Control 2.
Any help would be greatly appreciated. Thanks.
Below is what I currently have: The problem is the last line and I have a feeling this is a simple fix...
Code:
Private Sub image5_Click()
Dim sWHERE As String
Criminal_Background.Value = "Yes"
''If the ID is a number, built the WHERE clause like this:
sWHERE = "[ID] = " & Me.ID
'Open the form
DoCmd.Close , ""
DoCmd.OpenForm "Questionnaire_frm", acNormal, , sWHERE
Me.Criminal_Background.SetFocus
End Sub