G
Greg
i'm trying to get dlookup to pull a value from a query in the details section
of my report (which is based off of a different query). this way, it will
reflect the value i need it to as the groupings change. right now, i have:
=DLookUp("[units]","qrysoldunits",[qrysoldunits]![salesperson]=
[qrycontactdata]![Salesperson] And [qrysoldunits]![deptartment]=
[qrycontactdata]![Department] And ([qrysoldunits]![monthandyear] Between
[txtboxstartdate] And [txtboxenddate]))
but all i get is an error message (#error). if i remove the bit about the
dates being in the correct range:
=DLookUp("[units]","qrysoldunits",[qrysoldunits]![salesperson]=
[qrycontactdata]![Salesperson] And [qrysoldunits]![deptartment]=
[qrycontactdata]![Department])
it's not an error for the 1st salesperson, but it only pulls the units value
for the first record in the query, that may or may not match that salesperson
-- and for every other salesperson, it's an error.
i'm pretty sure that this is the right direction for my solution but i must
have my criteria wrong. please help.
of my report (which is based off of a different query). this way, it will
reflect the value i need it to as the groupings change. right now, i have:
=DLookUp("[units]","qrysoldunits",[qrysoldunits]![salesperson]=
[qrycontactdata]![Salesperson] And [qrysoldunits]![deptartment]=
[qrycontactdata]![Department] And ([qrysoldunits]![monthandyear] Between
[txtboxstartdate] And [txtboxenddate]))
but all i get is an error message (#error). if i remove the bit about the
dates being in the correct range:
=DLookUp("[units]","qrysoldunits",[qrysoldunits]![salesperson]=
[qrycontactdata]![Salesperson] And [qrysoldunits]![deptartment]=
[qrycontactdata]![Department])
it's not an error for the 1st salesperson, but it only pulls the units value
for the first record in the query, that may or may not match that salesperson
-- and for every other salesperson, it's an error.
i'm pretty sure that this is the right direction for my solution but i must
have my criteria wrong. please help.