Force a combobox

J

juddshanker

I have a combobox which has a row source with a UNION select to
include "<All>"
The same form has a checkbox the show or hide "obsolete" items.
A third "textbox"control allows the user to enter text that is used to
filter records.
The logic for building the query is in the combobox afterchange event
and works correctly.
The issue is trying to force the combobox afterchange event when the
user changes either the checkbox or textbox controls change

I have tried Me.combobox.Text = Me.combobox.text but I get a message
that the beforeupdate or properties of the combox are preventing the
app from changing the combox. I have set limittolist in code and the
form to False, but that was not successful. I have tried without
success me.combobox.requery. I have an inormative message on the
screen that tells the user to "RESELECT" the combobox if they change
the check or text box, but the users don't follow instructions and it
looks terribly unprofessional to me, even if my implementation skills
are limited.

Any help will be truly appreciated, thanks

Judd
 
J

Jeff Boyce

Judd

I'm not clear from your description, but it sounds like you'd like the
combobox's AfterUpdate procedure to run when either of the other two
controls change.

One approach would be to add "calls" to the combobox's AfterUpdate procedure
in the AfterUpdate procedures of each of those two controls...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

juddshanker

Judd

I'm not clear from your description, but it sounds like you'd like the
combobox's AfterUpdate procedure to run when either of the other two
controls change.

One approach would be to add "calls" to the combobox's AfterUpdate procedure
in the AfterUpdate procedures of each of those two controls...

Regards

Jeff Boyce
Microsoft Office/Access MVP









- Show quoted text -


I was just making a glass of tea, and I thought I suppose if I called/
or copied the same code ....
Thanks
 
J

Jeff Boyce

The advantage to copying the same code into another routine is that it is
simple.

The disadvantage of doing so is that you (or someone else) need to
know/remember to update that COPY if you ever change the code in the
original.

By calling that original code, you only have to remember to change it in one
place.

Regards

Jeff Boyce
Microsoft Office/Access MVP

Judd

I'm not clear from your description, but it sounds like you'd like the
combobox's AfterUpdate procedure to run when either of the other two
controls change.

One approach would be to add "calls" to the combobox's AfterUpdate
procedure
in the AfterUpdate procedures of each of those two controls...

Regards

Jeff Boyce
Microsoft Office/Access MVP









- Show quoted text -


I was just making a glass of tea, and I thought I suppose if I called/
or copied the same code ....
Thanks
 

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