[AccessD] combo box Limit to List question

DWUTKA at marlow.com DWUTKA at marlow.com
Mon Jun 7 10:30:25 CDT 2004


Susan, let's think about this for a minute.  Let's take a simple 'lookup'
table, with 'AccessD List Topics'.  Now we put a combo box on a form, to
allow the users to Select the topic from a list.  The 'bound' field is
really going to be a field NOT in the lookup table, but in some data entry
table.  So as long as the data they are seeing, is really going into the
table as they are seeing it, you can allow for 'Limit To List' to be off.
That is because if they type something that isn't in the combo box, the
combo box reverts to basic textbox logic, and just enters the data.

Now, let's put an ID field into our List topic table, and make the ID be the
value being entered into another table. If you allowed the users to see the
ID, and the text, they could actually try to enter both. (Obviously, if it's
an AutoNumber, that is going to be tricky....don't know how it would
'work').  However, you would usually set the width of the ID field to 0", so
that it is 'invisible' to the user.  The reason you cannot allow for items
not on the list, is because how is Access supposed to know what to put into
the bound field?  If you put 'The Great PK Debate', if there is not matching
ID field for that topic, Access has to figure out where to create the ID
from.  Yes, it sounds simple, but on a more complex combo box, where the ID
is coming from may be a little more convoluted.  That is why the 'NotOnList'
event is provided, to allow the developer to handle an entry that isn't on
the list.  

So is it really all that much of a surprise that you can't set Limit to List
off, if you have the actual field it is writing too 'invisible'?

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Susan Harkins
Sent: Sunday, June 06, 2004 9:44 AM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] combo box Limit to List question


Here's one I've never run across before -- you can't set the Limit to LIst
property to No if the control's bound column isn't visible? Wow... that's a
nasty little catch that could really be a clean up mess if you weren't
prepared for it. I've never run into it before. So, if you want an
updateable list, you have to display the bound column instead of whatever
data you really want to display... nasty. :(  
 
Susan H. 
-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list