the form jump after a AfterUpdate Event

F

Fabrice

Hello everybody,

I work with Access 2002. I have a long form and when I insert a text in the
field "np", the event afterUpdate of this field dropdown a combobox named
"localite". The code is the following.

Private Sub np_AfterUpdate()
With Me.localite
.Requery
.SetFocus
.Dropdown
End With
End Sub

That works well. The problem is the following :

If the combobox "localite" is in the middle of the screen, this event make
jump the screen in order to place the combobox "localite" in the bottom of
the screen (it is a long form). Is it possible to avoid this jump and to
maintain the combobox in the middle of the screen ?

I hope that my explanations are understanding, if not do not hesitate to ask
me information.

Thank you in advance for your help
Fabrice
 
A

Arvin Meyer [MVP]

This is a Windows GUI interface issue, not an Access/Office one. Access is
an MDI (Multiple Document Interface) application which follows Windows rules
for screen changes. On the Access side, the only thing you can do is to
redesign your form so that the conditions which cause your issue are
alleviated. You might try in one of the Windows groups to find an API which
controls this behavior, and then use that API to program a different result
within the Access MDI.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

Hello everybody,

I work with Access 2002. I have a long form and when I insert a text in the
field "np", the event afterUpdate of this field dropdown a combobox named
"localite". The code is the following.

Private Sub np_AfterUpdate()
With Me.localite
.Requery
.SetFocus
.Dropdown
End With
End Sub

That works well. The problem is the following :

If the combobox "localite" is in the middle of the screen, this event make
jump the screen in order to place the combobox "localite" in the bottom of
the screen (it is a long form). Is it possible to avoid this jump and to
maintain the combobox in the middle of the screen ?

I hope that my explanations are understanding, if not do not hesitate to ask
me information.

Thank you in advance for your help
Fabrice
 
F

Fabrice

Thank you for your answer, but it's too complicated for me (API).

Thank you and have a nice day
Fabrice
 
Top