DLookUp Error

LB79

Registered User.
Local time
Today, 04:58
Joined
Oct 26, 2007
Messages
505
Hello,

I'm having a problem with DLookUp and wondered if anyone can point out what is wrong?

I have a table (MyTable) which has a column (CurrentMonth). This table is updated on a monthly basis and all the records have the same current month. I want to show this in a txtbox and have used the following in the txtbox control source (the txtbox is on a subform but does that matter as I'm not referring to the control, the code is in the control itself?):

=DLookUp("[CurrentMonth]","MyTable")

But it returns Error.

Thanks for any help
 
Take it out of the control source and put it in the default value.

David
 
Brilliant!! Thanks DCrake!!
 

Users who are viewing this thread

Back
Top Bottom