[AccessD] Dlookup syntax

Gustav Brock gustav at cactus.dk
Wed Jul 21 03:56:36 CDT 2004


Hi Arthur

The syntax is OK.
The expression, however, must contain the usual US formatted
date(time) string:

  strDate = Format(d, "mm\/dd\/yyyy")

Then:

  X = Dlookup("myColumn", "myTable", "myDateColumn=#" & strDate & "#")

And, as Charlotte points out, always take care of a possible Null
return from DLookup().

/gustav


> I can't remember how to format this! Bloddy L. The second thing to go is
> memory. I forget what the first is.

> Dim s as string
> Dim x as Integer
> Dim d as Date

> d = Date()
> X = Dlookup("myColumn", "myTable", "myDateColumn=#" & d & "#")

> Doesn't seem to work. What should I be doing instead?

> TIA,
> Arthur




More information about the AccessD mailing list