G Marshall
Board Regular
- Joined
- Dec 31, 2002
- Messages
- 134
Hello
I have a form with a command button that has an "on click" event procedure. This procedure prints a service report and then moves to the next record. However when it moves to the next record the focus remains on the command button. I wish to set the focus on a text box on the new record which is called "ServiceRecordID".
The following is part of the code for the event procedure for the command button, what should I add to it to move the focus from the command button to my text box or indeed any other object on the form.
Dim strDocName As String
strDocName = "rptServiceReport"
' Print Service report, using qryServiceRecordsFilter query to print
' Service Report for current Service Record.
DoCmd.OpenReport strDocName, acViewNormal, "qryServiceRecordsFilter"
DoCmd.GoToRecord , , acNext
Appreciate any help
Gerald Marshall
I have a form with a command button that has an "on click" event procedure. This procedure prints a service report and then moves to the next record. However when it moves to the next record the focus remains on the command button. I wish to set the focus on a text box on the new record which is called "ServiceRecordID".
The following is part of the code for the event procedure for the command button, what should I add to it to move the focus from the command button to my text box or indeed any other object on the form.
Dim strDocName As String
strDocName = "rptServiceReport"
' Print Service report, using qryServiceRecordsFilter query to print
' Service Report for current Service Record.
DoCmd.OpenReport strDocName, acViewNormal, "qryServiceRecordsFilter"
DoCmd.GoToRecord , , acNext
Appreciate any help
Gerald Marshall