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 / Forms / April 2008

Tip: Looking for answers? Try searching our database.

Automating Processes using Forms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Greg - 09 Apr 2008 22:36 GMT
I was wondering if it was possible, using a form, to open up another form and
have it automatically pop-up the Ctrl+F feature.

And if possible, how?
Klatuu - 09 Apr 2008 22:54 GMT
Yes it is.
Use the Form's Load event.  First you want to set the focus to the control
you want to use in the Find because the Find dialog will open with that
control autmatically selected.  So the sequence is:

   Me.txtSomeControl.SetFocus
   Docmd.RunCommand acCmdFind
Signature

Dave Hargis, Microsoft Access MVP

> I was wondering if it was possible, using a form, to open up another form and
> have it automatically pop-up the Ctrl+F feature.
>
> And if possible, how?
Linq Adams - 09 Apr 2008 23:00 GMT
If you want the second form to always open and popup the Find box

Private Sub Form_Load()
 DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
End Sub

To insure the Find box pops up for the correct field:

Private Sub Form_Load()
 Me.DesiredField.SetFocus
 DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
End Sub

Signature

There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Klatuu - 10 Apr 2008 15:30 GMT
The DoMenuItem command is obsolete.  Help will tell you it is only there for
backward compatibility.  You should use the RunCommand going forward.

It is also much easier to understand what the code is actually doing.
Signature

Dave Hargis, Microsoft Access MVP

> If you want the second form to always open and popup the Find box
>
[quoted text clipped - 8 lines]
>   DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
> End Sub
 
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.