Microsoft
Software
Hardware
Network
Question : handling empty textboxes
Hello,
I have a form that adds values for different days up.
depending on data- some textboxes do not get a number inputed into them.
I declare variables like: Dim DayOne As Double
then for each variable I write: DayOne = IsNull(Me.txtDayOne), 0, Me.txtDayOne)
then I finish by saying me.Total = DayOne + DayTwo + etc.........
this works - I am just wondering if this is acceptable code
thank you
Answer : handling empty textboxes
DayOne = IIF(IsNull(Me.txtDayOne), 0, Me.txtDayOne)
davetough,
if it is working why not..
i don't see anything wrong with that...as you describe it..
Random Solutions
Find bottom level of an SQL Tree
Deriving Month from Text
DHCP not updating DNS Reverse lookup zones
How will adding a VBA reference to ADO 2.8 affect my database?
Changing Default Calendar in Outlook 2007
Combo Box List index
.NET: Entity Framework, Views and Stored Procedures
Access 2007 Linked to Sharepoint with Drop-downs - type mismatch
asp.net Why does'nt these required fields work. Only the Phone field works?
Compact & Repair linked Back end DB Access 2003 error 3356