Can someone help me understand why I get the following error sometimes but not all the time when running the code that also follow:
Error: Method 'Item' of Object 'Forms" Failed
Code:
Dim lstBox as ListBox
DoCmd.OpenForm "frmMktSgmt", acNormal
Set lstBox = Forms!frmMktSgmt!lstMktSgmts
' lstBox is a ListBox on the Form named "frmMktSgmt"
' The Form "frmMktSgmt" opens with no problem but I get the error at the line Set lstBox = Forms! . . .
Thank you for any help.
Jim
Error: Method 'Item' of Object 'Forms" Failed
Code:
Dim lstBox as ListBox
DoCmd.OpenForm "frmMktSgmt", acNormal
Set lstBox = Forms!frmMktSgmt!lstMktSgmts
' lstBox is a ListBox on the Form named "frmMktSgmt"
' The Form "frmMktSgmt" opens with no problem but I get the error at the line Set lstBox = Forms! . . .
Thank you for any help.
Jim