Maintain Focus on subfrm

renenger

Registered User.
Local time
Today, 00:01
Joined
Oct 25, 2002
Messages
117
I am having trouble keeping focus on a field in a subfrm when I click the next button for the next record.

I have a frmQuiz. This shows the quiz question. I have a subfrmUserAnswers, where the user enters the Answer ID in the field UserAnswerID. This form clears to a new record when the Next button is pressed for the next question and the focus is lost.

How can I maintain the focus?
 
You can write in code that moves the focus back to the field you want.

Sub NextButton_onClick()
Place all the code that executes above the line listed below.
Forms!MasterForm!SubForm.Form!FieldName.SetFocus
End Sub
 

Users who are viewing this thread

Back
Top Bottom