Activating a Control in the Header


P

PosseJohn

I'm using ACC2007.

I have a form "frmContacts", which I need to setfocus to a control
"datStoreName" in the FORM HEADER when it first opens.

I have tried the following...

Private Sub Form_Open (Cancel as Integer)
Me.datStoreName.SetFocus
End Sub

....but the first control in the DETAIL section retains focus when the form
opens.

How do I refer to a control in the FORM HEADER?

Thanks everyone...
 
Ad

Advertisements

A

Allen Browne

John, I've found this to be flaky as well.

You may have more success with the Load event than Open, but if the form is
complex and there is code in other events, it still may not work.

At very least, you could provide a hotkey for jumping to the control in the
form header. Include an ampersand in the Caption of the label attached to
this control. This example jumps there with Alt+S:
&Store Name
 
P

Paul Shapiro

Maybe you have to also set focus to the header section, as well as the
desired control in that section?
 
A

Allen Browne

Paul Shapiro said:
Maybe you have to also set focus to the header section, as well as the
desired control in that section?

How do you do that, Paul?
 
Ad

Advertisements

P

Paul Shapiro

Allen Browne said:
How do you do that, Paul?
Sorry, I thought I remembered having done that, but you're right of course.
There is no focus method for a form section.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top