Microsoft
Software
Hardware
Network
Question : If a field is blank I need it let other calculations after it work in a form. I know that its something to do with a null.
Here is my layout
Purchase Price
Loan amount
Load Date
Loan End Date
Interest
Expense (in sub form that totals with =Sum([Expense])
Sell price
Days of loan =DateDiff("d",[LoanDate],[
LoanEndDat
e])
Interest to date =Val(LoanAmount.Value)*Val
(InterestR
ate.Value)
*Val(Text9
9.Value)
Total Expenses =[Expenses Sub Form].Form!Text10
Trade Allowance
Total Investment =Val(PurchasePrice.Value)+
Val([Expen
ses Sub Form].Form!Text10)+Val(For
m!Interest
ToDate)
Profit =Val(SellPrice.Value)-Val(
TotalInves
tment.Valu
e)-Val(Tra
deAllowanc
e.Value)
So the way I have it now if I leave loan date, loan end date, interest or a expense all have no input the calculation field shows #Error. I need those fields to be blank or zero if there is no input, but once you put a purchase price in Total investment and profit should calculate ( be if it has not been sold it would be a number that would in parentheses)
Answer : If a field is blank I need it let other calculations after it work in a form. I know that its something to do with a null.
Access has a built-in Nz function
Nz(Value, ValueIfNull)
Days of loan = DateDiff("d",Nz([LoanDate]
,0),Nz([Lo
anEndDate]
,0))
OM Gang
Random Solutions
trouble with displaying recordset results in datasheet view
CREATE AN MSDOS BOOT CD FOR ACRONIS, KNOPPIX, GHOST, WINDOWS XP REPAIR CONSOLE!
Division & OLAP Cubes
I am trying to install ADFS on Windows server 2003 R2 - I can get the ADFS web components installed but...
Can an Outlook calendar be imported into SharePoint?
Decommission temp DC in 2008, giong to 2008 R2 domain
RPC/HTTP won't accept password on Exchange 2007 unless the Default Web Site is restarted
RRAS & VPN install on Server 2003
SQL Express 2005 ODBC Connection Error 67 and 17
Terminal Server - Outlook configures automatically when users login