Question : Dlookup on crosstab query

I have a crosstab query which looks up some data for me, ive attached some code below to show how i am populating the boxes, i am building the page to look like the cross tab query  but with text boxes instead of a datasheet, i dont know if there is an easier way to do it, if there is letting me know would be great.

What i am after is for the dlookup to check the crosstab query, and if there is a value in the cell to return it to the text box, however if there isnt a value i want it to return the value "0"

Cheers in advance.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
Me.rep2txt1.Value = DLookup("[Sent to Processing]", "totalstatusrep", "[SalesPerson] = 'Daniel James'")
Me.rep2txt2.Value = DLookup("[Query]", "totalstatusrep", "[SalesPerson] = 'Daniel James'")
Me.rep2txt3.Value = DLookup("[Returned to Field]", "totalstatusrep", "[SalesPerson] = 'Daniel James'")
Me.rep2txt4.Value = DLookup("[Sent to SMS]", "totalstatusrep", "[SalesPerson] = 'Daniel James'")
Me.rep2txt5.Value = DLookup("[SMS AI/KYC]", "totalstatusrep", "[SalesPerson] = 'Daniel James'")
Me.rep2txt6.Value = DLookup("[Harrogate]", "totalstatusrep", "[SalesPerson] = 'Daniel James'")
Me.rep2txt7.Value = DLookup("[Approved]", "totalstatusrep", "[SalesPerson] = 'Daniel James'")
Me.rep2txt8.Value = DLookup("[Despatched]", "totalstatusrep", "[SalesPerson] = 'Daniel James'")
Me.rep2txt9.Value = DLookup("[Installed]", "totalstatusrep", "[SalesPerson] = 'Daniel James'")
Me.rep2txt10.Value = DLookup("[Active]", "totalstatusrep", "[SalesPerson] = 'Daniel James'")
Me.rep2txt11.Value = DLookup("[Cancelled]", "totalstatusrep", "[SalesPerson] = 'Daniel James'")
Me.rep2txt12.Value = DLookup("[Declined]", "totalstatusrep", "[SalesPerson] = 'Daniel James'")
Open in New Window Select All

Answer : Dlookup on crosstab query

try

Me.rep1txt6.Value = Nz(DLookup("[Harrogate]", "totalstatusrep", "[SalesPerson] = 'Colin Morritt'"), "0")
Random Solutions  
 
programming4us programming4us