I have the following code which works fine:
 
	
	
	
		
 
and also the following code which works fine:
 
	
	
	
		
both give me the answers I want but,
 
in the absent table there is a column called Day (not days) and I want access (vba) to find all the occurances where combo136.value appears in the name field and 1 appears in the day column and where 1 does appear then show the value in the Day field.
 
I hope this makes sense.
 
Thanks
 
Martin
 
		Code:
	
	
	LTotal = DCount("Name", "Absent", "Name = combo136.value")
	and also the following code which works fine:
		Code:
	
	
	LTotal2 = DSum("Days", "Absent", "Name = combo136.value")
	in the absent table there is a column called Day (not days) and I want access (vba) to find all the occurances where combo136.value appears in the name field and 1 appears in the day column and where 1 does appear then show the value in the Day field.
I hope this makes sense.
Thanks
Martin