[AccessD] Re: Combo on Continuous Form

Jürgen Welz jwelz at hotmail.com
Wed Mar 10 16:54:17 CST 2004


I have used a textbox over a combo and hidden the textbox by running a 
procedure on the got focus to the combo behind and used a sql source for the 
combo that referenced a textbox on the current row as a filter.  I was sure 
I had seen another method but have not found it.  The concept of using a 
selector combo in the continuous form header as suggested by others works 
well.  In that case you requery the combo when the control in the record 
displaying the value selected from the combo when the value was set takes 
focus.  In the after update of the combo, update the current record.  The 
problem with doing it by hiding and unhiding a bound textbox in front of the 
combo on each row is that setting the row source of the combo for one row 
sets it for all rows and unhides the covering textbox on all rows as well.  
Thus it appears like the wrong value is in each row whicle the combo has the 
focus.  As soon as the lost focus of the combo fired, the textbox visibility 
was restored and each record showed the correct selection again.

The way I used it was there was a parent form which held an Estimate record. 
  I could associate a variety of contractors to whom we were submitting a 
bid by adding them to a continuous sub form.  In each row of the contractor 
records was a combo of all the contacts with that particular contractor.  In 
other words, the combo was filtered on the ContractorID for Contacts.  When 
a user clicked in a row, the rowsource for the combo now referenced the 
current ContractorID but I didn't requery the combo until it received focus.

Before moving to unbound continuous subforms (when John Colby saw my early 
unbound continous years ago, he said my code was unmaintainable), this was 
no way in which I've succeeded in making this work in a manner that had no 
obvious glitches (like the other rows showing the wrong combo when the bound 
textbox in front got focus.)

I have a database that uses the original method I posted, with a textbox in 
front of a combo, on a computer at an office I'll be visiting on Friday.  
The original code was probably written in '98 and I haven't udated it since. 
  It is the simplest way I know to do this even if it isn't perfect.  The 
continuous form recordsource must join the table displaying the values you 
want displayed in the textbox cum combo hide/unhide in order to work.  If 
you want, I can probably zip a small demo showing that approach on Friday 
and you can decide if it is workable for you.

I have tried other methods but failed because there is no ability to hook 
the scroll bar to determine a row for the purpose of floating a form control 
over the continous form combo.

Ciao
Jürgen Welz
Edmonton, Alberta
jwelz at hotmail.com





>From: "Mark A Matte" <markamatte at hotmail.com>
>Reply-To: Access Developers discussion and problem 
>solving<accessd at databaseadvisors.com>
>To: accessd at databaseadvisors.com
>Subject: RE: [AccessD] Re: Combo on Continuous Form
>Date: Wed, 10 Mar 2004 21:51:57 +0000
>MIME-Version: 1.0
>X-Originating-IP: [198.179.147.18]
>X-Originating-Email: [markamatte at hotmail.com]
>X-Sender: markamatte at hotmail.com
>Received: from mc3-f33.hotmail.com ([64.4.50.169]) by mc3-s12.hotmail.com 
>with Microsoft SMTPSVC(5.0.2195.6824); Wed, 10 Mar 2004 13:55:09 -0800
>Received: from databaseadvisors.com ([209.135.140.44]) by 
>mc3-f33.hotmail.com with Microsoft SMTPSVC(5.0.2195.6824); Wed, 10 Mar 2004 
>13:54:20 -0800
>Received: from databaseadvisors.com (databaseadvisors.com 
>[209.135.140.44])by databaseadvisors.com (8.11.6/8.11.6) with ESMTP id 
>i2ALq0M16312;Wed, 10 Mar 2004 15:52:00 -0600
>Received: from hotmail.com (bay1-f67.bay1.hotmail.com [65.54.245.67])by 
>databaseadvisors.com (8.11.6/8.11.6) with ESMTP id i2ALptM16215for 
><accessd at databaseadvisors.com>; Wed, 10 Mar 2004 15:51:55 -0600
>Received: from mail pickup service by hotmail.com with Microsoft 
>SMTPSVC;Wed, 10 Mar 2004 13:51:58 -0800
>Received: from 198.179.147.18 by by1fd.bay1.hotmail.msn.com with HTTP;Wed, 
>10 Mar 2004 21:51:57 GMT
>X-Message-Info: jl7Vrt/mfsqwkfPxX/ZB8/QWiwG/Wg9+
>Message-ID: <BAY1-F67Y3FIkPr1aTL0000c7df at hotmail.com>
>X-OriginalArrivalTime: 10 Mar 2004 21:51:58.0056 
>(UTC)FILETIME=[E910DE80:01C406E9]
>X-BeenThere: accessd at databaseadvisors.com
>X-Mailman-Version: 2.1.4
>Precedence: list
>List-Id: Access Developers discussion and problem 
>solving<accessd.databaseadvisors.com>
>List-Help: <mailto:accessd-request at databaseadvisors.com?subject=help>
>List-Post: <mailto:accessd at databaseadvisors.com>
>List-Subscribe: 
><http://databaseadvisors.com/mailman/listinfo/accessd>,<mailto:accessd-request at databaseadvisors.com?subject=subscribe>
>List-Archive: <http://databaseadvisors.com/pipermail/accessd>
>List-Unsubscribe: 
><http://databaseadvisors.com/mailman/listinfo/accessd>,<mailto:accessd-request at databaseadvisors.com?subject=unsubscribe>
>Errors-To: accessd-bounces at databaseadvisors.com
>Return-Path: accessd-bounces at databaseadvisors.com
>
>Robert,
>
>My original post was:
>
>In A2k I want a combo box on a each row of the continuous form that filters 
>by the current record on that continuous form.  Suggestions anyone?
>
>Thanks,
>
>Mark
>
>
>>From: "Robert L. Stewart" <rl_stewart at highstream.net>
>>Reply-To: Access Developers discussion and problem 
>>solving<accessd at databaseadvisors.com>
>>To: accessd at databaseadvisors.com
>>CC: markamatte at hotmail.com
>>Subject: [AccessD] Re: Combo on Continuous Form
>>Date: Wed, 10 Mar 2004 10:15:22 -0600
>>
>>Mark,
>>
>>What are you trying to accomplish?
>>
>>For example:
>>
>>I want a combobox on each row of a subform so I
>>can use it to open a second form with information
>>filtered not only by the information in the subform,
>>but also limited by my selection in the combobox.
>>
>>Please give use more information.
>>
>>Thanks
>>
>>Robert
>>
>>At 08:34 AM 3/10/2004 -0600, you wrote:
>>>Date: Wed, 10 Mar 2004 04:42:13 +0000
>>>From: "Mark A Matte" <markamatte at hotmail.com>
>>>Subject: RE: [AccessD] Combo on Continuous Form
>>>To: accessd at databaseadvisors.com
>>>Message-ID: <BAY1-F111NVYlLdHMuk0000eea9 at hotmail.com>
>>>Content-Type: text/plain; format=flowed
>>>
>>>Jürgen,
>>>
>>>If by multiple instances...you mean same combo appearing on each
>>>row/record...then yes...this is what I am trying to accomplish.
>>>
>>>Thanks,
>>>
>>>Mark
>>
>>
>>--
>>_______________________________________________
>>AccessD mailing list
>>AccessD at databaseadvisors.com
>>http://databaseadvisors.com/mailman/listinfo/accessd
>>Website: http://www.databaseadvisors.com
>
>_________________________________________________________________
>FREE pop-up blocking with the new MSN Toolbar – get it now! 
>http://clk.atdmt.com/AVE/go/onm00200415ave/direct/01/
>
>--
>_______________________________________________
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com

_________________________________________________________________
Add photos to your messages with MSN Premium. Get 2 months FREE*  
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines




More information about the AccessD mailing list