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!Addre ssDescription) Then fail = 2
If (IsNull(Me!Addr essDescription) Or Me!AddressDescr iption = "Main") And _
IsNull(Me!Addre ss1) And _
IsNull(Me!Addre ss2) And _
IsNull(Me!Addre ss3) And _
IsNull(Me!City) And _
IsNull(Me!State ) And _
IsNull(Me!Zipco de) And _
IsNull(Me!Count ry) _
Then fail = 3
Exit_Here:
Exit Sub
HandleErr:
Select Case Err.Number
Case Else
modHandler.LogE rr (Me.Form.Name)
Resume Exit_Here
End Select
End Sub