D
David Wetmore
I am trying to transfer a value from one form to another when I activate the destination form and then close the source
form (frmRecordViewer).
When I enable error checking, I get runtime error 438 on the KeyVal assignment line.
When I disable error checking the routine works fine; the value gets transferred and the source form
gets closed.
Private Sub Form_Activate() 'This is for the destination form
Dim KeyVal As Long 'Header Key for Selected Record
On Error Resume Next 'Otherwise error 438, but why?
KeyVal = CLng(Forms.frmRecordViewer.cboEntryName.Column(0))
If CurrentProject.AllForms("frmRecordViewer").IsLoaded Then
DoCmd.Close acForm, "frmRecordViewer"
End If
End Sub 'Form_Activate
What is going on here and what do I do about it?
Thanks
Dave Wetmore
form (frmRecordViewer).
When I enable error checking, I get runtime error 438 on the KeyVal assignment line.
When I disable error checking the routine works fine; the value gets transferred and the source form
gets closed.
Private Sub Form_Activate() 'This is for the destination form
Dim KeyVal As Long 'Header Key for Selected Record
On Error Resume Next 'Otherwise error 438, but why?
KeyVal = CLng(Forms.frmRecordViewer.cboEntryName.Column(0))
If CurrentProject.AllForms("frmRecordViewer").IsLoaded Then
DoCmd.Close acForm, "frmRecordViewer"
End If
End Sub 'Form_Activate
What is going on here and what do I do about it?
Thanks
Dave Wetmore