liquidspaces Posted December 4, 2002 Posted December 4, 2002 If SHIP_TO is dbnull, then it crashes on the strCurrent initialization. This is a bit confusing to me, because strCurrent is the variable I need to check for dbNull. I can't check it until I initialize it, but if I don't check it first I don't get the chance to initialize it. Jeesh. For i = 1 To objDataSet.Tables("Shipping").Rows.Count strCurrent = objDataSet.Tables("Shipping").Rows(i - 1).Item("SHIP_TO") LBTo.Items.Add(strCurrent) Next Any suggestions? Quote
*Gurus* Derek Stone Posted December 4, 2002 *Gurus* Posted December 4, 2002 If Not IsDBNull(objDataSet.Tables("Shipping").Rows(i - 1).Item("SHIP_TO") Then strCurrent = objDataSet.Tables("Shipping").Rows(i - 1).Item("SHIP_TO") End If Quote Posting Guidelines
liquidspaces Posted December 4, 2002 Author Posted December 4, 2002 Thank you, my friend. I was close, but used IsDBNull the wrong way. Thanks for being patient with my newbie questions, it's a real help. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.