I've heard it said that you only want to use a number (e.g. integer, long, etc.)
if you are going to do calculations or some kind of math with it. Is this true?
For example, I run a validate routine that checks an address entry - if
something's missing in the entry, the code does different things based on what
is missing, indicated my a 2 or a 3 - integer values. Should I use string data
types here? Does it matter?
Public Sub Validate()
Dim fail As Integer
On Error GoTo HandleErr
fail = 1
If IsNull(Me!AddressDescription) Then fail = 2
If (IsNull(Me!AddressDescription) Or Me!AddressDescription = "Main") And _
IsNull(Me!Address1) And _
IsNull(Me!Address2) And _
IsNull(Me!Address3) And _
IsNull(Me!City) And _
IsNull(Me!State) And _
IsNull(Me!Zipcode) And _
IsNull(Me!Country) _
Then fail = 3
Exit_Here:
Exit Sub
HandleErr:
Select Case Err.Number
Case Else
modHandler.LogErr (Me.Form.Name)
Resume Exit_Here
End Select
End Sub