[AccessD] combo box 101

William Benson (VBACreations.Com) vbacreations at gmail.com
Wed Aug 10 12:53:18 CDT 2011


I got ya ... so you mean do something in code and stick it in the row
source... I thought you meant having a function IN the rowsource which then
does something in VBA to generate SQL (ie dynamic) to adjust itself, which
of course would be impossible.
Thanks.
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: Wednesday, August 10, 2011 1:17 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] combo box 101

I call SQL generated by VBA code "dynamic code" because it is "dynamically
generated" as opposed to 
generated by the developer at design time.

John W. Colby
www.ColbyConsulting.com

On 8/10/2011 12:57 PM, William Benson wrote:
> John what does "dynamic SQL in the control itself" mean?
> On Aug 10, 2011 2:00 AM, "jwcolby"<jwcolby at colbyconsulting.com>  wrote:
>> I find all of these arguments valid however I also use Rick Fisher's Find
> and Replace which can find
>> unused objects and allow me to delete them. When you start manipulating
> the query in code then
>> dynamic sql in the control itself seems superior in most cases.
>>
>> John W. Colby
>> www.ColbyConsulting.com
>>
>> On 8/9/2011 9:44 PM, Stuart McLachlan wrote:
>>> On 9 Aug 2011 at 21:04, William Benson (VBACreations. wrote:
>>>
>>>> I think those who are comfortable with a lot of queries in their
>>>> database -- which there is no easy way to tell where that query is
>>>> being used, either in rowsources or in dependent queries ... probably
>>>> work in very stable object environments.
>>>>
>>>
>>>
>>> That's my main concern too.
>>>
>>> If you only use queries in VBA, it is easy to search and tabulate all
> occurences of a query
>>> name so that you can easily determine all the places it is used. That
> means that you can
>>> ensure that it is safe to modify/delete queries.
>>>
>>> If however you use them as the source of various controls/forms/reports
> it is MUCH harder to
>>> determine whether it is safe to modify/delete a query.
>>>
>>> 1. I've deleted this combobox on this form. Can I delete the query that
I
> used to populate it or
>>> is it used by another combobox somewhere on another form/report?
>>>
>>> 2. Users now want this combobox on this form sorted by firstname instead
> of lastname.
>>> Can I safely change the sort order of the query - Is the same query used
> in another
>>> combobox on another form?
>>> Do I have to create a new one query for this combobox or is there
another
> query somewhere
>>> already that does this which I can use instead?
>>> If I use a different query, can I safely delete the old one or is it
> still in use elsewhere?
>>>
>>> 3. There have been a number of changes made to various components of the
> application.
>>> Which of these queries are still in use somewhere and which should be
> deleted?
>>>
>>>
>> --
>> 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