G
Guest
Using Office 2003 and Windows XP;
If a text box control on a form contains a string, is it best practice to
use TEXT as in: sData = Me.MyControl.Text
Then, if it contains a value to use VALUE as in: iData = Me.MyControl.Value
Also, what is the best practice for determining if a textbox or a combo
contains a NULL. I've been using a construct like:
If Not IsNull(Me.MyControl.Value) Then iData = Me.MyControl.Value Else iData
= 0
Then I check the contents of iData. Is this the best or accepted practice?
Is there some other better fool proof way to get the contents and absolutely
deal with it without generating an error in the process and identify Null's,
or any other entry type, etc?
Please post a generic function if you have one. Thanks for your input and/or
discussion/advice on this.
If a text box control on a form contains a string, is it best practice to
use TEXT as in: sData = Me.MyControl.Text
Then, if it contains a value to use VALUE as in: iData = Me.MyControl.Value
Also, what is the best practice for determining if a textbox or a combo
contains a NULL. I've been using a construct like:
If Not IsNull(Me.MyControl.Value) Then iData = Me.MyControl.Value Else iData
= 0
Then I check the contents of iData. Is this the best or accepted practice?
Is there some other better fool proof way to get the contents and absolutely
deal with it without generating an error in the process and identify Null's,
or any other entry type, etc?
Please post a generic function if you have one. Thanks for your input and/or
discussion/advice on this.