'remembering' position in a combo box

C

cinnie

greetings

My form has a combo box with a very lengthy list. During a work session,
this form is opened and closed several times. During the session, I would
like the combo box to show the same record when the form is opened as when it
was closed. When Access is first starts, I'd like the first record to show
as is usual. I'm not sure how to code this.

(I guess I could simulate this by having my Close button just hide the form,
but I'd like to know if there is a good way to explicitly code it.)

much thanks
 
M

Marshall Barton

cinnie said:
My form has a combo box with a very lengthy list. During a work session,
this form is opened and closed several times. During the session, I would
like the combo box to show the same record when the form is opened as when it
was closed. When Access is first starts, I'd like the first record to show
as is usual. I'm not sure how to code this.

(I guess I could simulate this by having my Close button just hide the form,
but I'd like to know if there is a good way to explicitly code it.)


That's actually a pretty good idea.

If you really need to close the form, then you will need a
place to "remember" the combo box's value. If you don't
need it to remember between Access sessions, the use an
invisible text box on an always open form or a global
(standard module Public) Variant variable.
 
Top