Limited Combo Box allowing empty string -- BUG?!?

G

Guest

Hello everyone,

I am using an up-to-date (as far as OfficeUpdate tells me, at least)
Access 2003, and discovered an annoying feature that may even be a bug
with an Access Project.

I have a combo box on a form, bound to a data field that is, on the SQL
server side, defined as NOT NULL. The RowSource for the control is a
SQL statement that pulls a list of values, and the "Limit to List"
property of the combo box control is set to "Yes".

In a nutshell, I want to be sure that there is always a valid piece of
data in that field.

However, what Access is allowing a user to do is select an item in the
list, then "erase" that value's characters using the delete key, and
consequently saving the record with the empty string as the control's
value. Thus, instead of getting a valid value for that field, I get
the empty string.

While I understand there are ways around this, it seems as though it is
not supposed to function that way. After all, the empty string is NOT
a value in the drop-down list, and when I say "Limit to List: YES", I
don't want ANY value submitted that is not in the list!

On the server side, I cannot filter for the empty string without a
trigger (ugh!), so I am left with using code in the "BeforeUpdate"
event for EVERY limited control to keep users from "erasing" the value,
thinking they are deleting the record.

Is this a bug? Have others had this problem? Is there a global option
somewhere that can modify this behavior? I can't think of any instance
where I would want it to behave the way it does. Can you?

Thanks,
Todd

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...-a146-31b87c5b5898&dg=microsoft.public.access
 
G

Guest

Sorry, but I didn't realize how the "Question" vs. "Suggestion for Microsoft"
thing worked, so I'm going to add the suggestion below:

If the behavior of a limited combo bow allowing the empty string as a valid
value is not a bug, my suggestion is that combo boxes with the "Limit to
list" property set to "Yes" do NOT allow the empty string as a valid value
unless the empty string is enumerated as an option in the drop-down.

Please vote for this to help us all maintain data integrity!

-Todd
 
T

tomashek

Woa, I didn't realize posting this on Microsoft's forum site would add
it to the Google Groups post as well!

Sorry for the redundancy everyone!

-Todd
 

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