Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / May 2008

Tip: Looking for answers? Try searching our database.

#Name? error on Control Source from Query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sandy - 02 May 2008 19:39 GMT
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
Jeanette Cunningham - 03 May 2008 04:17 GMT
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

>I have a query (which is based on a sub query) as follows:
>
[quoted text clipped - 15 lines]
> thanks
> sandra
Sandy - 03 May 2008 17:28 GMT
Thanks, Jeanette - this worked perfectly.

I used
= DLookup( "[MaxOfDelDate]", "NameOfQuery")

with no criteria as that was already defined in the query, which returns
only one record and one field

:-)
s-

> Sandy,
> use a dlookup to get the value for the unbound field.
[quoted text clipped - 25 lines]
> > thanks
> > sandra
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.