Jumat, 02 Mei 2014

RE: [MS_AccessPros] Dlookup in (sub)Report

 


 
Duane,
This information is extremely useful and I will keep it close to my heart.
What I dont understand is that in VB code, sometimes a=b works and sometimes a=""" & [b] & """") is neccessesary. When does that apply?.
 
Sorry, about the thread, I did not realize that I need to click 'show message history', I thought it was the default.
 
Thanks again for your help
 
Sarah

---In MS_Access_Professionals@yahoogroups.com, <duanehookom@...> wrote :

Sarah,
 
It typically helps us older/mature members if you include enough of the previous messages to at least jog our failing memory.
 
If Numeric:

=DLookUp("FieldName","TableName","[NumericField]= " & [NumberValue])

If text/string that will never contain an apostrophe like O'Brien:
=DLookUp("FieldName","TableName","[TextField] = '" & [StringValue] & "'")
If text/string that might contain an apostrophe like O'Brien:
=DLookUp("FieldName","TableName","[TextField] = """ & [StringValue] & """")
 
If Date:
=DLookUp("FieldName","TableName","[DateField] = #" & [DateValue] & "#")
 
You may need to copy and paste the above into Word or some place that you can enlarge and change the font to fixed space.

 
To: MS_Access_Professionals@yahoogroups.com
From: sarahk@...
Date: Thu, 1 May 2014 08:52:11 -0700
Subject: RE: [MS_AccessPros] Dlookup in (sub)Report



Duane, Thank you!! Your syntax made it work. I am totally confused on how to use the &,",# etc symbols. I dont know when and how to use it and find it very confusing.
Thanks again.
Sarah



__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (5)

Did you check out automatic photo albums in Yahoo Groups?
When you send mail to your Yahoo Group with photos attached, a photo album with attached photos is automatically created. When your group members reply to the email with photo attachments, those photos are added to the 'photomatic' albums automatically!

.

__,_._,___

Tidak ada komentar:

Posting Komentar