Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Textbox dlookup problem 1

Status
Not open for further replies.

Danglez

Technical User
Jul 13, 2004
29
US
I have three textboxes that give the balance of 3 different accounts. They are called 'GCI', 'NY', & 'IBF'

Their control sources use dlookup to get the value from two queries for each respective account. My problem is the the NY and GCI boxes are working fine but the IBF one keeps coming up blank.

I have tried copying the NY and GCI sources and get the right number but as soon as I change the name to IBF I get a blank box.

NY Control Source (works fine):
=(DLookUp("[Branch Sums Maturity]![SumOfCashflow]","Branch Sums Maturity","Branch= 'NY'")+DLookUp("[Branch Sums Value]![SumOfAmount]","Branch Sums Value","Branch='NY'"))/1000000

IBF Control Source (Blank Box):
=(DLookUp("[Branch Sums Maturity]![SumOfCashflow]","Branch Sums Maturity","Branch= 'IBF'")+DLookUp("[Branch Sums Value]![SumOfAmount]","Branch Sums Value","Branch='IBF'"))/1000000

Any Ideas??
Thanks in advance
 
Are you totally sure that
DLookUp("[Branch Sums Maturity]![SumOfCashflow]","Branch Sums Maturity","Branch= 'IBF'")

does actually yield a valid numerical result ?


Are you totally sure that
DLookUp("[Branch Sums Value]![SumOfAmount]","Branch Sums Value","Branch='IBF'")

does actually yield a valid numerical result ?


If not then try

=(Nz(DLookUp("[Branch Sums Maturity]![SumOfCashflow]","Branch Sums Maturity","Branch= 'IBF'"),0) + Nz(DLookUp("[Branch Sums Value]![SumOfAmount]","Branch Sums Value","Branch='IBF'"),0))/1000000




'ope-that-'elps.



G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
That Worked! Thank you, could you explain a bit what the NZ function does and how that worked because I think I could apply to some other textboxes which would simplify some things for me.
 
Your best bet for 'how does it work' type questions is to refer to the HELP section and read the 'official' line.

Highlight the Nz and hit F1





G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top