dlookup

digs

Registered User.
Local time
Today, 09:35
Joined
Aug 16, 2004
Messages
20
I've got a dlookup problem, i'm working on an adp recreating from an mdb. I've got a main form called contract_sessons and then a sub form called session_contracts and a sub form in that called consessions. In the consessions this holds ths dates for each session what i'm trying to do is lookup the period for the date in the table called dates. The current code I'm using in an unbound field is =DLookUp("[Period]","[dates]","[date]=Forms![Contract_Sessions].Form![Session_Contracts].Form![conSessions].Form![Date]") but all that appears is #error.

Anyone help
 
Try that although bear in mind that Date is a reserved word and shouldn't be used to name any object in your database. You seem to be referencing too many forms too and were looking for the field to equal the literal reference and not the value of the reference.

Code:
=DLookUp("[Period]","[dates]","[date] = #" & Forms("Contract_Sessions").[Session_Contracts].Form.[conSessions].Form.[Date] & "#")
 
Solved the problem by using a stored procedure
 

Users who are viewing this thread

Back
Top Bottom