Combobox and data validation

G

GlenC

Having some problems with this so I've been reviewing the "Contextures"
tutorials.
With the "DataValCombobox.xls" sample file, I entered an item (in the Combo
box) not on the list and when I clicked on another cell it accepted the bad
name. If I try to make the same error in the validation dropdown list (not
doubleclicked cell) it's not allowed.

Can anyone tell me how to ensure that the combobox entries are validated
when the box is left?

Also, is there a way to exit the Combo box with keystrokes and not have to
use the mouse to select another cell?
 
J

JLatham

You might look at their
http://www.contextures.com/DataValComboCheck.zip file instead, although that
one seems to be problematic - I get an "not valid for cell..." message even
when choosing from the provided list.

But it should give you an idea of what's going on - choose from the combo
box and it tosses your entry into the cell which has been set up with data
validation and it is the one that actually tosses up the invalid alert
message.

As for moving out of one of those without clicking elsewhere, I don't know
how.

One thing you might look at is using the Combo box from the Forms toolbar,
which can be directly tied to a list and which pretty much forces you to
select from the list so the validating is unnecessary.
 
G

GlenC

Thanks for the tips. Your description, "choose from the combo
box and it tosses your entry into the cell which has been set up with data
validation and it is the one that actually tosses up the invalid alert
message.", is what I wanted, but that's not the way the sample program
works. It takes the cell you want to validate and counts the occurences of
the cell contents in the validation list and gives an error message if not
found.

I discovered that the {Esc} key will exit from the combo box leaving your
selection in the target cell, but this is awkward to use and bypasses the
validation.

What I want to do is for when the user selects a cell, a combo box based on
the field name pops up for better viewing and autocomplete, after a couple of
keystrokes the selection is complete and a {Tab} or {Enter} key will populate
the cell and it will be validated and move to the next cell. I have the data
validation and movement working OK but the ComboBox is driving me batty.

Glen
 

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