Question : Activate (Requery) a Combo Box w/ VBA

Hello ~

I would like to pass a value from one form to a combo box in a form I am opening w/ VBA AND activate / requery the combo box on the recently opened form, using the value I passed to it.

Using:

    DoCmd.OpenForm stDocName, , , stLinkCriteria
    DoCmd.GoToRecord , , acNewRec
    Forms!frmCountReq!Combo35 = 17
    Forms!frmCountReq!Combo35.Requery

The form opens and the number 17 is passed to Combo35, but the focus remains on Combo35.  I am unable to actually activate the combo box w/ VBA, the way pressing Enter on the keyboard does.

Ideas?

Many Thanks, Jacob

Answer : Activate (Requery) a Combo Box w/ VBA


 Forms!frmCountReq!Combo35 = 17
 Forms!frmCountReq!Combo35.DropDown


  Forms!form2.txtCopy.SetFocus      'set the focus to another control
Random Solutions  
 
programming4us programming4us