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
FOREACH LOOP - DOS
How to limit the memory usage of a VB.NET process in Win Server 2008
The string was not recognized as a valid DateTime when I call the Stored Procedure
How to make outlook 2003 run at all times on Windows 2003 server
Compiled code in md*B* vs md*E* ?
VB FORMULA - Loop
Have full control in Sharepoint but cannot view groiup
What is the equivalent to SQL Servers @@ROWCOUNT?
Printer goes offline during print job
Run multiple paramenter query from one button