Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to avoid a null field as a key

Status
Not open for further replies.

QuickQuestion

Technical User
Nov 6, 2002
2
US
Reading a linked table that uses a postal code to assign the package to the right driver from another table, VB aborts when the postal code is empty (OK when there is a space in the field).

How could I test the rsIn.Field("POSTAL") to identify the problem and replace it with a field containing a space?

I tried
if rsIn.Field("POSTAL") = " ",
if rsIn.Field("POSTAL") = "", and
if rsIn.Field("POSTAL") is Null without success.

Thanks for your help
 
try
if isNull(rsIn.Field("POSTAL")) then
rsIn.Field("POSTAL") = " "
end if
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top