473,396 Members | 2,106 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Limit to List question?

MLH
I have a form: frmVehicleEntryForm
The form has a combo-box control: AuthEntityChooserBox
The combo-box has a RowSource: property of:
SELECT DISTINCTROW IIf(IsNull([Company]),[Name],[Company]) AS
EntityName, qryAuthorizingEntities.Address,
IIf(IsNull([Company]),"Person","Company") AS EntityType,
qryAuthorizingEntities.AuthID FROM qryAuthorizingEntities;
The combo-box's BOUND field is the 4th and last field: AuthID

qryAuthorizingEntities lists values between 1 and 350 in the AuthID
field. There are NO RECORDS in the source table (tblAuth) with values
over 350 - none.

The combo-box's LimitToList property is set to Yes.

How is it, then, that the following line runs WITHOUT ERROR
and actually succeeds in placing 500 in that control?
Me!AuthEntityChooserBox = 500

I can type Print Me!AuthEntityChooserBoxin the debug window and it
will return 500. The value is DEFINITELY there. How can that be?
Apr 8 '07 #1
2 3474
I not tested this, but in code, you can do all kinds of things, and the user
interface is ignored.

When you modify a value via code, NONE of the events fire. So, the before
update, after update, not in list....all of those things don't fire (none
never did..for the last 15+ years of ms-access).

So, it not really much of a surprise that the not-in list code don't
fire...since events don't fire when you use code and by-pass the user
interface.

The above is not only an explain, but, if you realize that events don't fire
when modifying values via code..then the ability to by-pass what you have on
a form makes sense. often, this ability is EXACLTY why we use code!!

If you going to need to limit the list via code, then you have to test.

eg:

dim lngValue as long
lngValue = 500

if isnull(dlookup("AuthID","qryAuthorizingEntities"," Authid = " & lngValue))
= true then
....value is not legal..
else
.....value is ok
end i
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com
Apr 9 '07 #2
MLH
Thanks, Albert.
I understand.
Apr 9 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Tamer Higazi | last post by:
Hi! I have problems creating joins between tables and to limit rows for a specified clolumn. I have 2 tables! employees departments I face the problems with the GROUP BY clause and i don't...
0
by: D. Dante Lorenso | last post by:
I need to know that original number of rows that WOULD have been returned by a SELECT statement if the LIMIT / OFFSET where not present in the statement. Is there a way to get this data from PG ?...
3
by: deko | last post by:
Is there any way to limit the number of records loaded into a ListBox? I looked at qdf.MaxRecords (to apply to the query that is the RowSource of the ListBox) but that only applies to ODBC data...
9
by: Terry E Dow | last post by:
Howdy, I am having trouble with the objectCategory=group member.Count attribute. I get one of three counts, a number between 1-999, no member (does not contain member property), or 0. Using...
4
by: Rabbit | last post by:
Hi, I've been using MS Access to devleop applications for long time, I like a feature called "Limit To List" when setting combo box in design time (accept text only when matches one of the...
3
by: Kriston-Vizi Janos | last post by:
Dear Mr. Kern, and Members, Thank you very much for the fast answer, my question became over-simplified. My source code is appended below. It uses two text files (L.txt and GC.txt) as input...
1
by: suchismita.83 | last post by:
Hi, I am developing a messaging form which will use webmail in c#.The mailing list will inherit costomised groups from MOSS 2007 site.So the mailing list may vary in future. I just wanted to...
1
by: injanib via AccessMonster.com | last post by:
is it possible that if the limit to list property of a combobox is set to true the focus is passed onto another field? What I mean is that I have a combo box with the limit to list property set to...
4
dlite922
by: dlite922 | last post by:
hey guys, I'm doing some brain storming and getting ideas to come up with a solution. I have a list of ....data... that is displayed 10 per page with the LIMIT clause. Simply put: My...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.