[AccessD] Manually populate a listbox

StaRKeY starkey at wanadoo.nl
Sun Aug 15 13:18:20 CDT 2004


Hi, 

Use a function for the recordsource and a loop in this function using
dateadd to build all dates between 'From' and 'To' making use of static
variables:-) Access help has an example of how to built the specific
function for this purpose. At least 97/2000 did I believe if not I'll have
to look it up for you.


Regards, 

Eric Starkenburg 
Starkenburg Office Solutions 

-----Oorspronkelijk bericht----- 
Van: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] Namens Susan Harkins 
Verzonden: zondag 15 augustus 2004 19:47 
Aan: 'Access Developers discussion and problem solving' 
Onderwerp: RE: [AccessD] Manually populate a listbox 

Arthur, you could create a Recordset populated with the results of your
query and then set the list box control's Recordset property to the same. 

Susan H. 

I'm having a senior moment. Given a form containing three controls: 

txtDateFrom - starting date 
txtDateTo - ending date 
lstDates - to contain one row for all dates between from and to inclusive 

I want to manufacture all dates between the start and end date and populate
the listbox with same. I forget how to do it. I'm used to grabbing data
using SQL etc. and I suppose I could just build a table containing loads of
dates and query that, but I'm wondering how to manufacture the listbox rows
instead.

Will someone kindly nudge me in the right direction? 


-- 
_______________________________________________ 
AccessD mailing list 
AccessD at databaseadvisors.com 
http://databaseadvisors.com/mailman/listinfo/accessd 
Website: http://www.databaseadvisors.com 



  _____  

avast! Antivirus <http://www.avast.com> : Uitgaande bericht is niet besmet. 


Virus Gegevensbestand (VPS): 0433-3, 13-08-2004
Getest op: 15-8-2004 20:18:20
avast! auteursrecht (c) 2000-2004 ALWIL Software.






More information about the AccessD mailing list