Combo box Drop down

A

Annelie

I have a client where I use access 2003 in access 2002 format and when I use
the following code it works great.

Private Sub EmployeeSelect_Change()
EmployeeSelect.Dropdown
End Sub

On another client is keep getting error messages and I think it must be
because some library is not loaded. What could it be?
Annelie
 
A

Annelie

I lost this post.
Run-Time Error 2185. You can't reference a property or methos for a control
unless the control has the focus.
This is in Access 2002, access 2000 format.
Annelie
 
K

Ken Snell

That error message suggests that the code is being "called" when the combo
box EmployeeSelect does not have the focus. When you say it's working on one
client's machine but not on the other's, then two possibilities come to
mind:

(1) The one client is doing something differently from the other client that
causes this code to run when the combo box doesn't have the focus.

(2) The database (or the form) on the client's machine that is erroring may
be corrupted. Try replacing the database file with one that is working.
 
A

Annelie

The two databases are in the basic structure the same, but are still very
different. I wrote both. This particular form, however, it the same in both
programs. I don't seem to have a problem in Access 2003, but with Access
2002 I am constantly running into different little problems like this.
Perhaps the libraries are a little different. I need to put my access 2002
on their server, so I can convert the data to 2002 and then perhaps some of
the problems will disappear. I only have one user over there and he has
2002.

I was able to resolve the below problem by putting it into the On Enter
event. It works well and no error message.
Thanks for your help.
I would like to understand this focus thing. When you scroll through the
combo box, it does not have focus until you actually select one item of the
list. Strangely enough, the message does not appear until after an employee
is selected. The curser at that time sits on the employee name field of the
main form. Conditional formatting shows that the combo box has focus when
the list drops down, then the focus shifts to the EmployeeName field on the
main form. Perhaps something is corrupted.
Annelie
 

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