access combobox values not showing -


i trying create form 3 combo boxes on run report existing data. combo boxes filter down based on data chosen in next level combo box.

however i'm having issues batch number combobox not populating it's list

now vba script:

private sub form_load()     me.cbodate.rowsource = ""     me.cbobatchno.rowsource = "" end sub  private sub cbobottleno_afterupdate()     dim sdatesource string          sdatesource = "select [tblnewcc].[date] [tblnewcc]" & _         " [tblnewcc].[bottleno] = " & me.cbobottleno.value          me.cbodate.rowsource = sdatesource         me.cbodate.requery end sub  private sub cbodate_afterupdate()     dim sbatchsource string          sbatchsource = "select [tblbatchtotals].[batchno] [tblbatchtotals] inner join [tblnewcc] on [tblbatchtotals].[runno]=[tblnewcc].[runno]" & _         " [tblnewcc].[bottleno] = " & me.cbobottleno.value & _         " , [tblnewcc].[date] = " & me.cbodate.value      me.cbobatchno.rowsource = sbatchsource     me.cbobatchno.requery end sub 

from can see working alright on vba side can see replacing rowsource of batch number combobox, , in datasheet view giving me results.

enter image description here

however combobox isn't showing in it's list....

enter image description here

unless go in make change , save sql query again.

any clues?

the last part of sbatchsource should " , [tblnewcc].[date] = #" & me.cbodate.value & "#" aside, 'date' terrible name field. reserved word in access , cause problems. here helpful link http://www.fontstuff.com/access/acctut15pfv.htm


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -