View Single Post
  #2  
Old May 3rd, 2008, 04:17 AM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default #Name? error on Control Source from Query

Sandy,
use a dlookup to get the value for the unbound field.
set its control source =DLookup( "[MaxOfDelDate]", "NameOfQuery",
strCriteria)
build the strCriteria using the fields that uniquely identify the record on
your form.
Check out vba help on Dlookup.


Jeanette Cunningham -- Melbourne Victoria Australia


"Sandy" wrote in message
...
I have a query (which is based on a sub query) as follows:

SELECT Max(t_costs.DelDate) AS MaxOfDelDate
FROM [q_MaxOfBBOMDeliveryDate-Sub] INNER JOIN t_costs ON
([q_MaxOfBBOMDeliveryDate-Sub].MaxOfBOMRev = t_costs.BOMRev) AND
([q_MaxOfBBOMDeliveryDate-Sub].Job_ID = t_costs.Job_ID) AND
([q_MaxOfBBOMDeliveryDate-Sub].BOMType = t_costs.BOMType);

The control source for my unbound field is:
=[q_MaxOfBBOMDeliveryDate]![MaxOfDelDate]

... but this is giving me a #Name? error.

Format of the control is Medium Date

Your help would be appreciated.

thanks
sandra