View Single Post
  #14  
Old December 13th, 2006, 08:43 PM posted to microsoft.public.access.forms
Thomy5 via AccessMonster.com
external usenet poster
 
Posts: 9
Default DSUM with AND in access

When i enter it as :

intUnder31 = DSum("Nz([Under31])", "tblAbsense", "Nz([EmployeeID], ' " & doej
& " ' ) = '" & Me.EmployeeID & "' AND Nz([Start_Date_Of_Absense],#9/24/2006#)
# " & dteSDate & " # ")

it returns an error " Variable not defined" with doej highlighted.
I'm kind of new at this and mostly self taught. could you please explain what
you mean by "where doej is declaired"?

Douglas J. Steele wrote:
That's not what I said to do. Remove the quotes around doej:

intUnder31 = DSum("Nz([Under31])", "tblAbsense", "Nz([EmployeeID],'" & doej
& "') = '" & Me.EmployeeID & "'AND Nz([Start_Date_Of_Absense],#9/24/2006#)

# " & dteSDate & " # ")

If that still doesn't work, then please answer my question about where doej
is declared.

Douglas,

[quoted text clipped - 24 lines]

-Thomy5


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200612/1