Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / July 2005

Tip: Looking for answers? Try searching our database.

docmd.domenuitem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Souris - 19 Jul 2005 17:30 GMT
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
Allen Browne - 20 Jul 2005 07:56 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.