theinviter
Registered User.
- Local time
- Today, 12:14
- Joined
- Aug 14, 2014
- Messages
- 268
Dear guys
need help
I Have a list in a form, once you click on any items it will go to record in the form, but if there is no record it go to first record, so i need that if no record then show a message " No Record Found"
i tried this code .
Private Sub List6_DblClick(Cancel As Integer)
On Error GoTo errhandler:
n = 1 / 0 ' cause an error
'Move to the record selected in the control
Me.MRN_Query.Form.RecordsetClone.FindFirst "[Item] = '" & Me.List6.Value & "'"
Me.MRN_Query.Form.Bookmark = Me.MRN_Query.Form.RecordsetClone.Bookmark
Exit Sub
errhandler:
' error handling code
Resume Next
End Sub
need help
I Have a list in a form, once you click on any items it will go to record in the form, but if there is no record it go to first record, so i need that if no record then show a message " No Record Found"
i tried this code .
Private Sub List6_DblClick(Cancel As Integer)
On Error GoTo errhandler:
n = 1 / 0 ' cause an error
'Move to the record selected in the control
Me.MRN_Query.Form.RecordsetClone.FindFirst "[Item] = '" & Me.List6.Value & "'"
Me.MRN_Query.Form.Bookmark = Me.MRN_Query.Form.RecordsetClone.Bookmark
Exit Sub
errhandler:
' error handling code
Resume Next
End Sub