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
event id 1073 user unable to restart
Change the background color of a CDateTimeCtrl object.
How do I get the time only from a SQL datetime value?
Error # 429: ActiveX component can't create object by db1 when sending automatic email
Access questions re: forms
Can anyone suggest a good spec for a games machine?
How do I place an image next to a database item in SQL Reporting Services
How can I retrieve a list of printer trays for a specific printer?
Access 2007 VBA code for Make Table Query
Creating an automatic sum for specific cells - excel 2007