DLookup

  • Thread starter samotek via AccessMonster.com
  • Start date
S

samotek via AccessMonster.com

I cannot explain myself why my function is not working.I have the following
DLookup control:
="Payment : " & "" & DLookUp("[required date]";"orders")

My separate control required date is ok and shows the date, but i have
nothing in the DLook control.Why is it so ?
 
G

Gina Whipp

samotek,

Not working is so vague... Perhaps it's because there is a semi-colon as
opposed to a comma? Also how does it know which Order to look-up the
Required Date for? Perhaps telling what you mean by not working would get
you better replies...

="Payment : " & DLookUp("[required date]","orders")


--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 
F

fredg

I cannot explain myself why my function is not working.I have the following
DLookup control:
="Payment : " & "" & DLookUp("[required date]";"orders")

My separate control required date is ok and shows the date, but i have
nothing in the DLook control.Why is it so ?

How many records are in the table or query named "orders"?
More than one?
Then you must add a where clause to your DLookUp so Access knows which
record to Look Up.

Also, What is the purpose of this part of the code ( & "" &)?
As far as I can see it does nothing.
And I see you have used the semi-colon ; as argument separator.
Try the comma , instead.
="Payment : " & DLookUp("[required date]","orders")
should work, if "Orders" contains just one record, and the name of
this control is not "Required Date".

Look up "DLookUp" in VBA help for the necessary arguments, as well as
"Restrict data to a subset of records" to learn how to write a where
clause for the various datatypes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top