getting a combo box that has a row source equal to a query - and the query takes data from a form -
        Posted  
        
            by primus285
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by primus285
        
        
        
        Published on 2010-04-19T19:49:45Z
        Indexed on 
            2010/04/19
            19:53 UTC
        
        
        Read the original article
        Hit count: 242
        
I have a combo box with a row source based on an SQL query about like
SELECT DISTINCT Database_New.ASEC 
FROM Database_New 
WHERE Database_New.Date>= DateSerial([cboYear], 1, 1)
      And Database_New.Date<= DateSerial([cboYear], 12, 31); 
the trouble is that if I change the value of cboYear, the values in the drop down cboASEC do not update. I have to open the query, save it and close it to get the thing to update while I have the form open. Is there a way to get the cboASEC to update somehow? maybe a little tidbit of code in the cboYear - afterupdate?
© Stack Overflow or respective owner