P
Pasadena-D via AccessMonster.com
I have a ComboBox in my form, which is called "Pay_Period_Ending_Filter". I'd
like the default value of "Pay_Period_Ending_Filter" to be a date based on a
DLookUp to a query. I want it to take the current date and find the closest
value listed in the "qryPay_Period_Ending" query, and "Pay_Period_Ending"
field, and use this as the default value for "Pay_Period_Ending_Filter" when
I 1st open the form.
I've tried this in Access, but it gives me an error:
[Pay_Period_Ending_Filter].[Value]=DLookUp("Pay_Period_Ending",
"qryPay_Period_Ending","Pay_Period_Ending >= " & Date())
I can do this in Excel as follows, but can't get DLookUp to do it: =VLOOKUP
(NOW(),qryPay_Period_Ending,1,TRUE) In Excel I VLOOKUP Now() in the data
range "qryPay_Period_Ending", and it returns the closest value from column 1
of that data range. I have no clue how to do this in DLookUp. Please help!!!
like the default value of "Pay_Period_Ending_Filter" to be a date based on a
DLookUp to a query. I want it to take the current date and find the closest
value listed in the "qryPay_Period_Ending" query, and "Pay_Period_Ending"
field, and use this as the default value for "Pay_Period_Ending_Filter" when
I 1st open the form.
I've tried this in Access, but it gives me an error:
[Pay_Period_Ending_Filter].[Value]=DLookUp("Pay_Period_Ending",
"qryPay_Period_Ending","Pay_Period_Ending >= " & Date())
I can do this in Excel as follows, but can't get DLookUp to do it: =VLOOKUP
(NOW(),qryPay_Period_Ending,1,TRUE) In Excel I VLOOKUP Now() in the data
range "qryPay_Period_Ending", and it returns the closest value from column 1
of that data range. I have no clue how to do this in DLookUp. Please help!!!