[AccessD] Interesting run time error

jwcolby jwcolby at colbyconsulting.com
Fri Mar 14 13:47:43 CDT 2008


Form open.

This is a form in a library, that is loaded and populated from data inside
of the FE.  In this specific case it is for a combo that displays FE
(application) users in a combo in a LWS user form.  The LWS system might run
in a system where there is no personnel table already in existence and so it
provides its own LWS pe table.  There is a field that is the PEID of a
personnel table in the FE (if any).  It is entirely possible to not have any
data at all in the case of this combo.  

In spite of all this it is possible (from inside of the LWS library) to
check if the table or query name passed in is valid in the FE and if not
then fail gracefully by not setting any Sql statement at all.  I haven't
tried that however.

I just found it interesting that while the form would load and allow me to
set the rowsource of the combo to invalid stuff, the data for the combo
doesn't pull until you try to use it, which is long after the rowsource is
loaded.

John W. Colby
Colby Consulting
www.ColbyConsulting.com 
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins
Sent: Friday, March 14, 2008 2:28 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Interesting run time error

John, what event are you using to populate the combo? Does this happen with
Form Load and Form open?

Why is the SQL statement invalid? When building it, couldn't you check it
before setting the combo?

Susan H.


> When a combo is assigned an invalid sql string, perhaps a select from 
> a non-existent table or a OrderBy clause on a non-existent field, 
> there is not error until you try to drop down or otherwise use the 
> combo.  The error pops out of the depths of Access and AFAICT cannot 
> be trapped.

--
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