J
Jeremy
Currently I use the following VBA to fill a field. As many of you already
know the DLookup function is quite slow. Can someone help me or give me a
example of how I could do the same thing with SQL? I don't know SQL very
well.
Private Function avggross(person As String) As Long
Dim varx As Variant
Dim crit As String
crit = "[Sales Person] = '" & person & "'"
varx = DLookup("[SumOfSumOfGross Profit1] ", "year_salesperson_avg Query",
crit)
avggross = varx
End Function
know the DLookup function is quite slow. Can someone help me or give me a
example of how I could do the same thing with SQL? I don't know SQL very
well.
Private Function avggross(person As String) As Long
Dim varx As Variant
Dim crit As String
crit = "[Sales Person] = '" & person & "'"
varx = DLookup("[SumOfSumOfGross Profit1] ", "year_salesperson_avg Query",
crit)
avggross = varx
End Function