Tema: Null
Ver Mensaje Individual
  #2 (permalink)  
Antiguo 29/10/2007, 11:42
Avatar de GeoAvila
GeoAvila
Colaborador
 
Fecha de Ingreso: diciembre-2003
Ubicación: Antigua Guatemala
Mensajes: 4.032
Antigüedad: 21 años, 4 meses
Puntos: 53
Re: Null

If Not IsNull(rst.Fields(2)) Then
txtDir.Item(1).Text = rst.Fields(2)
Else
msgbox("Se ha detectado campo nulo")
Exit sub
End If

esto haría que se salga del Sub

también podrías tratar con un valor por default por ejemplo

If Not IsNull(rst.Fields(2)) Then
txtDir.Item(1).Text = rst.Fields(2)
Else
txtDir.Item(1).Text = "ValorDefault"
End If

nos vemos..
__________________
* Antes de preguntar lee las FAQ, y por favor no hagas preguntas en las FAQ
Sitio http://www.geoavila.com twitter: @GeoAvila