A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

DLookup



 
 
Thread Tools Display Modes
  #1  
Old September 2nd, 2009, 09:24 PM posted to microsoft.public.access.reports
samotek via AccessMonster.com
external usenet poster
 
Posts: 29
Default DLookup

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 ?

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ports/200909/1

  #2  
Old September 2nd, 2009, 10:17 PM posted to microsoft.public.access.reports
Gina Whipp
external usenet poster
 
Posts: 3,500
Default DLookup

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

"samotek via AccessMonster.com" u15330@uwe wrote in message
news:9b88598a17ef7@uwe...
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 ?

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ports/200909/1



  #3  
Old September 2nd, 2009, 10:23 PM posted to microsoft.public.access.reports
fredg
external usenet poster
 
Posts: 4,386
Default DLookup

On Wed, 02 Sep 2009 20:24:40 GMT, samotek via AccessMonster.com wrote:

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.

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:01 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.