set focus to controle on subform -
10-19-2010
, 01:27 PM
Dear All,
Access 2010
I (want to) do these actions:
1. Find the item I want to add in a Combobox.
2. Click the cmdbutton that adds a the choosen item to the subforms
recordset.
3. overwrite the field-value in PRJARTM_AANT_EENH in the new record
But entering new data after clicking the cmdbutton ( action 2) I add data in
the Combobox.
If i click on the subform (anywhere) before I type, it's OK
Code cmdbutton OnClick :
... adding a new record ....
Me.SUBFRM_PROJECT_BEREKNING.Requery
Me.SUBFRM_PROJECT_BEREKNING.SetFocus
DoCmd.GoToRecord , , acLast
Me.SUBFRM_PROJECT_BEREKNING.Form.PRJARTM_AANT_EENH .SetFocus
Thanks,
Filip |