[AccessD] combo box 101

Jim Dettman jimdettman at verizon.net
Tue Aug 9 05:24:20 CDT 2011



 That's one change I wish Microsoft had not made; compiling SELECT
statements in controls and forms into query def objects.

 In the past, having a saved query vs. SQL statement for a rowsource was
different.   This gave the developer the choice of having a pre-costed and
saved execution plan vs one that was not.  There are rare cases when a
pre-costed plan is not the best option.

  Now, it doesn't matter and you always get a pre-costed plan whether you
want it or not.

Jim.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan
Sent: Monday, August 08, 2011 09:37 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] combo box 101

I think it is a matter of taste.  I prefer SQL to Querydefs as the source of
table based 
comboboxes - I find it easier to maintain.

-- 
Stuart

On 8 Aug 2011 at 20:28, Arthur Fuller wrote:

> I don't want to get argumentative here; I hoping that the agreed
> purpose is discussion and exchange of information. But I have to say,
> I hate this kind of code, and every time I'm called in to do a job on
> some previous version, pretty much the second thing I do is search for
> any rowsources that begin with the word "SELECT", then open them and
> then save them to named queries I also hate the citation of a specific
> form and field on said form, because that renders the code strictly
> local, when in actuality you might to re-use that query in several
> places (other forms or subforms, other queries, various reports, etc.)
> 
> So my initial suggestion would be to replace the SELECT statement with
> a named query, and instead of using a reference to a specific form
> create some static functions that return the desired value(s) whether
> or not the form is open. That frees you up to set the static values
> and then run the queries from the immediate window, so you can debug
> them effectively.
> 
> The previous responses have also included good ideas about column
> width and column count.
> 
> HTH,
> Arthur
> 
> On Mon, Aug 8, 2011 at 5:42 PM, Bob Gajewski
> <rbgajewski at roadrunner.com>wrote:
> 
> > Sounds obvious, but check the column count ... Even if you have the
> > widths set for multiple columns (0",0",2") and the bound column set
> > (0), if your column count is set to 1 then that's all you get!
> >
> > Bob Gajewski
> >
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 



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