devander
asked on
Setfocus using Navigation form
I developed a group of forms that I then moved into a Navigation Form. When testing this code from just the original form (not in the Navigation form) it worked fine:
Private Sub StopField_Enter()
Forms!BarQCProdForms!Inspe ctorName.S etFocus
End Sub
The Form name is BarQCProdForms and the field I set the focus to is InspectorName
My Navigation form name is E1E2Forms and now the BarQCProdForms is within that.
When I test while in the Navigation form I get the error message :
Run-time error ‘2465”:
Microsoft Access can’t find the field ‘InspectorName’ referred to in your expression.
I tried several things including changing BarQCProdForms to E1E2Forms within the Forms! Statement.
Thanks for any help you can provide.
Private Sub StopField_Enter()
Forms!BarQCProdForms!Inspe
End Sub
The Form name is BarQCProdForms and the field I set the focus to is InspectorName
My Navigation form name is E1E2Forms and now the BarQCProdForms is within that.
When I test while in the Navigation form I get the error message :
Run-time error ‘2465”:
Microsoft Access can’t find the field ‘InspectorName’ referred to in your expression.
I tried several things including changing BarQCProdForms to E1E2Forms within the Forms! Statement.
Thanks for any help you can provide.
[BarQCProdForms].Form![Ins pectorName ].Setfocus
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sometimes, just asking the question forces us to rethink the problem...
I see, I read it as being set from the parent form, not within the subform. Looking for a problem when there wasn't one lol