ClaraBarton
Registered User.
- Local time
- Today, 07:55
- Joined
- Oct 14, 2019
- Messages
- 605
Code:
Public Sub FormFocus()
Dim sf1 As Control
Dim sf2 As Control
Set sf1 = Me!Form.sfcInvoice.Form
Set sf2 = sf1.sfcInvItem
sfl.SetFocus
sf2.SetFocus
sf2.Form!Description.SetFocus
Set sf2 = Nothing
Set sf1 = Nothing
at sf1.SetFocus I get a Variable Not Defined error
This sub is called from sfcCustDetail
Which has a subform named sfcInvoice
Which has a subform named sfcInvItem
I have also tried Set sf1 = Forms!sfcCustDetail.Form.sfcInvoice.Form and I get the same error
Can you point me to my error?