Quite simply i need to figure out how to rewrite the following code for VB6 so that my application allows nothing to be passed into a textbox.text value
Function GetDbValue(ByVal tb)
If tb.Text = "" Then
Return Nothing
Else
Return tb.Text
End If
End Function
Im getting a syntax error for "return nothing"
EDIT:
Stored proc
Set prm = cmdDlrID.CreateParameter("@ContractNumberField", adVarChar, adParamInput, 50, GetDbValue(txtContNum))
cmdDlrID.Parameters.Append prm