M
Maverick
I'm not sure if this belongs in this section or not.
I created code to set the default value of an unbound combobox based on the
following expression:
DLookUp("[tblReportYears]![DateYear]","tblReportYears","
right([tblReportYears]![DateYear],4) ='" & Year(Now()) & "' and" &
"[tblReportYears]![FiscalCalendar]='" & "Fiscal" & "'").
It returns a calculation instead of the actual value in the table. This
expression works perfectly in a textbox which returns the value of 2007/2008.
However, the result of the code is the calculation of 2007 divided by 2008.
This is a simple dlookup... why is it performing a calculation? I just want
it to return the text value of 2007/2008. I've tried making it a string but
get a type mismatch error. I'm sure the answer is simple, but it eludes me.
Thanks.
I created code to set the default value of an unbound combobox based on the
following expression:
DLookUp("[tblReportYears]![DateYear]","tblReportYears","
right([tblReportYears]![DateYear],4) ='" & Year(Now()) & "' and" &
"[tblReportYears]![FiscalCalendar]='" & "Fiscal" & "'").
It returns a calculation instead of the actual value in the table. This
expression works perfectly in a textbox which returns the value of 2007/2008.
However, the result of the code is the calculation of 2007 divided by 2008.
This is a simple dlookup... why is it performing a calculation? I just want
it to return the text value of 2007/2008. I've tried making it a string but
get a type mismatch error. I'm sure the answer is simple, but it eludes me.
Thanks.