I have a search button on the form and run the access search form.
I wanted to inform user to add data if the data not found from database.
I found that Access using docmd.domenuitem
"DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70"
Can I get any reponse from above code to know the data does not exist to add
some coding here?
Any information is great appreciated
As you found, DoMenuItem returns no value, so you don't know if the find
succeeded.
A different approach is to FindFirst in the RecordsetClone of the form. You
can then test NoMatch, and take action.
For a simple example of using FindFirst and popping up a MsgBox if not
found, see:
http://allenbrowne.com/ser-03.html

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
>I have a search button on the form and run the access search form.
>
[quoted text clipped - 9 lines]
>
> Any information is great appreciated