[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 410
  • Last Modified:

Dsum and Like

Experts,

I am trying to modify the below Dsum to include a LIKE qualifier (check the bold)...I get a syntax.  

Let me know where I am wrong...thank you

=Nz(DSum("[SumOfApproved Amount In USD Equivalent]","qryLCIssued_Sum_Import-CSM_2","[Guarantor Description] = like &* '" & [txtBankName2] & "'" *& ),0)
0
pdvsa
Asked:
pdvsa
  • 2
  • 2
1 Solution
 
pdvsaAuthor Commented:
here is an exploded view
(without the like qualifier)


untitled.JPG
0
 
NorieCommented:
This is how you would add the Like

"[Guarantor Description] Like '*" & [txtBankName2] & "*'"

So you were almost right, just needed the wildcards inside the single quotes.

Here's the full expression with the Like.

=Nz(DSum("[SumOfApproved Amount In USD Equivalent]","qryLCIssued_Sum_Import-CSM_2","[Guarantor Description] Like '*" & [txtBankName2] & "*'"),0)
0
 
Rey Obrero (Capricorn1)Commented:
you don't use "=" and "Like" together, you use only one , "=" or "Like"


=Nz(DSum("[SumOfApproved Amount In USD Equivalent]","qryLCIssued_Sum_Import-CSM_2","[Guarantor Description]  like & '*" & [txtBankName2] & "*'"),0)
0
 
pdvsaAuthor Commented:
ok that was it.   I will have to ask another question because I think I need a Len I suppose.  The like statement is returning 0 Dsum.
0
 
NorieCommented:
What is it you are trying to check for?

If you tell us that it might simplify the whole thing.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now