Share via

Getting #Error with nz(Dlookup

Anonymous
2012-11-02T15:50:29+00:00

I keep getting a #Error when using a Dlookup, even though I've incorporated an "NZ"

Here is the formula I'm using:

Actual Servicing: nz(DLookUp("["+[tbl_Program_Types].[srp grid]+" "+Replace(Format([tbl_daily_lock_status_report].[Rate],"0.000"),".","#")+IIf([tbl_Program_Types].[srp grid] Like "*SRPG*"," 44BPS"," 25BPS")+"]","tbl_"+[tbl_Program_Types].[srp grid],"date = #"+Format([tbl_daily_lock_status_report].[Trade_Settlement Date],"mm/dd/yyyy")+"#"),0)

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Anonymous
    2012-11-02T18:41:07+00:00

    I'm getting the #Error in instances where the "Trade Settlement Date" field is null.  Do I have the nz in the wrong place?  How can I add the nz to both the dlookup and where the "Format([tbl_daily_lock_status_report].[Trade_Settlement Date]" is?

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2012-11-02T16:35:05+00:00

    Essentially it's doing a couple lookups to identify a specific interest rate based on the "Trade Settlement Date" for the given account type found in the "SRP Grid".  I can say that the formula works for any instance where there is a number found but it's the places where there isn't an answer found and I'm trying to have it default to a "0" where it's giving me the #Error.  Sorry, I know it's a little confusing but just know that the way it is that it does in fact work where I need it to but it's where there should just be a null value (0) that I get the error.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2012-11-02T16:15:22+00:00

    I keep getting a #Error when using a Dlookup, even though I've incorporated an "NZ"

     

    Here is the formula I'm using:

    Actual Servicing: nz(DLookUp("["+[tbl_Program_Types].[srp grid]+" "+Replace(Format([tbl_daily_lock_status_report].[Rate],"0.000"),".","#")+IIf([tbl_Program_Types].[srp grid] Like "*SRPG*"," 44BPS"," 25BPS")+"]","tbl_"+[tbl_Program_Types].[srp grid],"date = #"+Format([tbl_daily_lock_status_report].[Trade_Settlement Date],"mm/dd/yyyy")+"#"),0)

    Okay, perhaps you can explain what you're trying to get because this Dlookup is horribly, horribly wrong but I can't make out what it is you really want.

    Was this answer helpful?

    0 comments No comments