combo box item data property

D

dave

Hey, I am having a problem with my combo box. I have a subform that when adds
a new entry into a table upon return from the subform i would like to go to
the new entry so i have refreshed the query and now have the following code
in the subform:

Form_FrmIP.Refresh
Form_FrmIP.Requery
Form_FrmIP.Combo19.ItemData (Form_FrmIP.Combo19.ListCount - 1)
DoCmd.Close

but when running it i get a message box that says Invalid Use of Property
and highlights ItemData. Am I doing something wrong that I'm missing?
 
G

George Nicholson

Try:

Form_FrmIP.Combo19 = Form_FrmIP.Combo19.ItemData
(Form_FrmIP.Combo19.ListCount - 1)
 
D

dave

Thanks that did the trick(though i had to move it to after the refresh and
requery. only problem now is i thought the text boxes that updated when i
made a selection normaly would also update like i had clicked on the
selection. oh well back to the drawing board. thanks again
 
Top