David44Coder
Member
- Local time
- Tomorrow, 09:31
- Joined
- May 20, 2022
- Messages
- 109
A dbl-click event in Form2 should call a Sub in Form1 the close. But Access will not exceute it.
It tells me
Run—time error '2109':
There is no field named 'cboCode' in the current record.
And there's not... but why would Access be looking for it ? Should it not just follow the code instructions ?
But if click Debug I can step through perfectly and the subroutine in Form1 executes correctly'
Form2 code
Form1 code
Thanks for any help with this.
It tells me
Run—time error '2109':
There is no field named 'cboCode' in the current record.
And there's not... but why would Access be looking for it ? Should it not just follow the code instructions ?
But if click Debug I can step through perfectly and the subroutine in Form1 executes correctly'
Form2 code
Code:
Private Sub Code_DblClick(Cancel As Integer)
Form_Form1.GotoCode (Code) '>>>>>>>>>>> this is the line halted in yellow
DoCmd.Close acForm, "Form2"
End Sub
Form1 code
Code:
Sub GotoCode(x)
DoCmd.GoToControl "cboCode"
Me!txtCode2 = x
DoCmd.FindRecord Me![txtCode2]
End Sub