Use FIND Menu item on subform

PaddyIrishMan

Registered User.
Local time
Today, 13:08
Joined
Jun 5, 2002
Messages
166
Hi,
I'm trying to open the Access Find function for a subform, I've tried:
screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70.

I've also tried using SendKeys & RunCommand

The problem is that I want to open the Find for the subform by clicking a button on the Parent form. (There are no fields on the parent form & no link between the forms)

Each time I get an Error - The command Find isnt available now etc..

This is obviously to do with trying to control the Find Function for the Subform via the main form. (If I click manually it's fine!!)

Does anyone know of a way of doing this?

Thanks in advance,
Patrick
 
This is what I use to call a find function from the main form to seach a subform....

Me.YourSubformNameHere.SetFocus
DoCmd.RunCommand acCmdFind

I advise against using SendKeys.

HTH
 
Thanks!

That worked nicely ghudson,
Thanks for your help! :cool:
 

Users who are viewing this thread

Back
Top Bottom