Hello,
I am using Access 2000 and have searched everywhere and cannot find the answer to this! I want to lookup [hours] (a number field) in a table where [group] can be a dynamic group name and, [low_months] and [high_months] are number fields. If my value, yrssrv is between [low_months] and [high_months] and my value, grp matches [group] then I need to know the number of [hours] in [tbl_Vacation Schedule (New Prior Year)].
...something like this but using between.
numhours = DLookup("[Hours]", "[tbl_Vacation Schedule (New Prior Year)]", _
"[group]= '" & grp & "'" & _
" And [Low_Months] >= " & yrssrv & _
" And [High_Months] <= '" & yrssrv & "'")
I am using Access 2000 and have searched everywhere and cannot find the answer to this! I want to lookup [hours] (a number field) in a table where [group] can be a dynamic group name and, [low_months] and [high_months] are number fields. If my value, yrssrv is between [low_months] and [high_months] and my value, grp matches [group] then I need to know the number of [hours] in [tbl_Vacation Schedule (New Prior Year)].
...something like this but using between.
numhours = DLookup("[Hours]", "[tbl_Vacation Schedule (New Prior Year)]", _
"[group]= '" & grp & "'" & _
" And [Low_Months] >= " & yrssrv & _
" And [High_Months] <= '" & yrssrv & "'")